Skip to main content
Known Participant
March 25, 2010
Question

Trying to get form information after using cfselect onchange

  • March 25, 2010
  • 1 reply
  • 498 views

When I use a cfselect and try to change to make a change of its value refresh the page, I get an error that there is no form.description variable.  I guess this is because at the point of changing the value of the select I haven't clicked the Submit button, which would send the form data.

So, I tried to get the value from the form by using the DOM as follows, but there is no document variable:

<cfselect query="qDescriptionsByInteraction" name="description" id="s3" display="MEDIABITNAME" value="MEDIABITID" width="200" label="Description (video):" onChange="getURL('#thispage#'?description=#document.fQuiz.description.value#)"></cfselect>

Is there a way to get the value that you change the <cfselect> to to be sent as if you had submitted the form by using onchange?

    This topic has been closed for replies.

    1 reply

    Known Participant
    March 25, 2010

    I figured out the solution. I can just use the following:

    onChange="submitForm()"