Jump to content


Photo

Option Field Redirection


  • Please log in to reply
4 replies to this topic

#1 ph34r007

ph34r007
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 25 August 2006 - 06:19 PM

Hey guys,

Is it possible to make an option field that when you pick an option it redirects you to a certain page, and if you pick another option it takes you to another? Im trying to make this for an ordering form. I tried looking on google but i couldnt find anything, and if my memory servers  me correctly ive been to a site that did this before.

#2 syed

syed
  • Members
  • PipPipPip
  • Advanced Member
  • 151 posts
  • LocationEngland

Posted 25 August 2006 - 09:01 PM

Hi, I think this is what you want, just run the script and see if its what you want.

<script language = javascript>

function send(){

if (document.form1.options[0].checked){
window.location = "http://www.cy2online.net";
}
else{
window.location = "http://www.google.com";
}

}

</script>

<form name=form1>
<input type=radio name=options value="Cy2 Online.net">Cy2 Online.net
<input type=radio name=options value="google">Google
<br>
<input type="button" name="button1" value="Send" onclick="send()">
</form>

#3 ph34r007

ph34r007
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 25 August 2006 - 10:08 PM

well i mactually trying to do it with a drop down menu as opposed to radio buttons is it still possible to do?

#4 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 25 August 2006 - 10:13 PM

http://javascriptkit...utindex16.shtml - one of those is certainly what you want
Legend has it that reading the manual never killed anyone.
My site

#5 ph34r007

ph34r007
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 25 August 2006 - 10:25 PM

thank you very much i found exactly what i needed, gonna bookmark that page :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users