Copy link to clipboard
Copied
I am having trouble trying to get <cfselect onBlur=""> to work inside of a <cfform format="flash"> using Flash. As soon as I put any value into the quotation marks, the Flash form no longer displays.
CFSELECT does not support onblur. But why would you use that? A select control does not "blur" when you change the value. You can use onchange.
<cfselect name="fish" onChange="getURL('newUrl.cfm?page='+fish.text)">
...
--
-Fernis - fernis.net - ColdFusion Developer For Hire
Copy link to clipboard
Copied
CFSELECT does not support onblur. But why would you use that? A select control does not "blur" when you change the value. You can use onchange.
<cfselect name="fish" onChange="getURL('newUrl.cfm?page='+fish.text)">
...
--
-Fernis - fernis.net - ColdFusion Developer For Hire
Copy link to clipboard
Copied
Even onchange didn't work. But I will try with the syntax that you are showing here.
The reason I wanted to have the page refresh is when I choose a different select option, I wanted the page to go back to the database and based on that selection change the value displayed on the page for the number of items added for that selection.
Copy link to clipboard
Copied
The current code I have using your syntax is the following:
<cfset thisPage = "http://#cgi.server_name#">
<cfif len(trim(cgi.server_port))>
<cfset thisPage ="#thisPage#:#cgi.server_port##cgi.script_name#?#cgi.query_string#">
<cfelse>
<cfset thispage ="#thisPage##cgi.script_name#?#cgi.query_string#">
</cfif>
<cfform name="fQuiz" preloader="false" format="flash" height="750" preservedata="yes">
...
<cfselect query="qDescriptionsByInteraction" name="description" id="s3" display="MEDIABITNAME" value="MEDIABITID" width="200" label="Description (video):" onChange="getURL('#thispage#')"></cfselect>
...
</cfform>
Copy link to clipboard
Copied
Now, when I change the select nothing happens. Maybe this is because I am trying to just
load the current page so that the page looks for the new value based on what is now selected.
Copy link to clipboard
Copied
Now when I refreshed the page, I am getting a result when I change the select's value. I just have to now fix a problem with
Thank you for helping me get the select to respond to my input.
Copy link to clipboard
Copied
I'm glad you got it working. Your latest error message is however totally unrelated to anything we've seen. You are just trying to access a variable named "nextnum" somewhere in your code without assigning it first on the same page (or defining a default value for it with cfparam).
-Fernis
Copy link to clipboard
Copied
I fixed that problem by assigning a value to nextNum inside the conditional block for if as I recall, last night, which may have been this morning as long as I had worked yesterday.
Thanks again for getting my cfselect code back on track, because at one point I was using window.location and location.href and it wasn't doing anything. I guess I needed to use actionscript syntax.
I eventually used submitForm() but later decided to wait until I clicked the submit button anyway so that I could populate the form with the new select value and textFields.
Copy link to clipboard
Copied
I had the same problem, but using geturl() work to reload the page But every time a used it The page shows "form data has expired"
I want to submit the page instead to reload. Becuase if I click submit bottom I have created works fine.
Thanks
Copy link to clipboard
Copied
I guess the reason why the onchange="window.location..." technique was not working is because this is a flash and not html form and you have to use ActionScripts's getUrl technique for cfselect onchange.