Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Ajax.Updater on checkbox elem not passing checkbox value to backend

    Hi all, I'm a n00b Ajax developer, so bear w/ me. I need some help with a script that should be fairly straightforward. I'm developing a form for internal QA that allows a user to check a checkbox confirming a particular test has been done, updating the database on the fly. I chose prototype because thats what we use in house, and while the call is working fine, the only parm that is not being sent is the checkbox value, for example:

    <p>Have requirements been requested from the client?
    <input type="checkbox" name="requirements" id="req" value="y"
    onclick="new Ajax.Updater('testPlan', 'updateTestPlan.iphtml',
    { asynchronous:true, evalScripts:true,
    parameters:'item=<% = $Q::item %>&amp;pm=<% = $env->{REMOTE_USER} %>'});"></p>

    The value of "y" when the check box is checked or null when it's not checked is not being passed to the backend..what am I missing here?

    We're using a perl framework on Apache::ASP for the backend, if that makes any diff.

    tia for any help.


  • #2
    Regular Coder ohgod's Avatar
    Join Date
    Jun 2008
    Location
    Ohio
    Posts
    579
    Thanks
    6
    Thanked 69 Times in 69 Posts
    well, where in
    Code:
    parameters:'item=<% = $Q::item %>&amp;pm=<% = $env->{REMOTE_USER} %>'
    are you even trying to get the value of y?

  • #3
    New to the CF scene
    Join Date
    Jun 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    value of y

    How can I do that in the parms string? I was under the impression that the value would be passed..no?

  • #4
    Regular Coder ohgod's Avatar
    Join Date
    Jun 2008
    Location
    Ohio
    Posts
    579
    Thanks
    6
    Thanked 69 Times in 69 Posts
    not unless you tell it to, or leave the parameter string blank (not 100% on the second part)

    try
    Code:
    parameters:'item=<% = $Q::item %>&pm=<% = $env->{REMOTE_USER} %>&y='+$F('y')


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •