Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
I figured out the solution. I can just use the following:
onChange="submitForm()"