Jump to content

Archived

This topic is now archived and is closed to further replies.

ph34r007

Option Field Redirection

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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>

Share this post


Link to post
Share on other sites
well i mactually trying to do it with a drop down menu as opposed to radio buttons is it still possible to do?

Share this post


Link to post
Share on other sites
http://javascriptkit.com/script/cutindex16.shtml - one of those is certainly what you want

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.