jimboVB
asked on
dropdown box onChange problems
Hi Experts,
I got the scripts from EE and was testing on it, but there's some problems:
<script language="JavaScript">
function gotosite(url)
{
window.location.href=url;
}
</script>
<cfselect name="type" multiple="no" passthrough="onChange='got osite(this .options[t his.select edIndex].v alue)'">
<cfoutput query="ssr_albumtype_list" >
<option value='photo_add.cfm?type= #albumtype #'>#albumt ype#</opti on>
</cfoutput>
</cfselect>
Dropdown values
- member
- public
Ok, When i select a value (public) from the dropdown, the page will refresh itself. But the type i selected did not change in the dropdown box, it is still (member). I can't select back the (member) value. What is wrong with my codes?
Jimbo
I got the scripts from EE and was testing on it, but there's some problems:
<script language="JavaScript">
function gotosite(url)
{
window.location.href=url;
}
</script>
<cfselect name="type" multiple="no" passthrough="onChange='got
<cfoutput query="ssr_albumtype_list"
<option value='photo_add.cfm?type=
</cfoutput>
</cfselect>
Dropdown values
- member
- public
Ok, When i select a value (public) from the dropdown, the page will refresh itself. But the type i selected did not change in the dropdown box, it is still (member). I can't select back the (member) value. What is wrong with my codes?
Jimbo
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
well, nevermind, i got it solved.
just added this line of code
<cfparam name="url.type" default="all">
thanks for helping... ^^
just added this line of code
<cfparam name="url.type" default="all">
thanks for helping... ^^
ASKER
I got another question though, quicks answers too.. =P
Alrite, when i click on this link "photo_add.cfm" (without defining ?type= at the back) the server will give me an error. "TYPE is undefined in URL". What can i do?