Link to home
Start Free TrialLog in
Avatar of jimboVB
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='gotosite(this.options[this.selectedIndex].value)'">
<cfoutput query="ssr_albumtype_list">
      <option value='photo_add.cfm?type=#albumtype#'>#albumtype#</option>
</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
Avatar of anandkp
anandkp
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jimboVB
jimboVB

ASKER

Alrite, that was a fast answer, thx.. XD

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?
Avatar of jimboVB

ASKER

well, nevermind, i got it solved.
just added this line of code

<cfparam name="url.type" default="all">

thanks for helping... ^^