Jump to content

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.
Link to comment
https://forums.phpfreaks.com/topic/18658-option-field-redirection/
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>
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.