ph34r007 Posted August 25, 2006 Share Posted August 25, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/18658-option-field-redirection/ Share on other sites More sharing options...
syed Posted August 25, 2006 Share Posted August 25, 2006 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> Quote Link to comment https://forums.phpfreaks.com/topic/18658-option-field-redirection/#findComment-80470 Share on other sites More sharing options...
ph34r007 Posted August 25, 2006 Author Share Posted August 25, 2006 well i mactually trying to do it with a drop down menu as opposed to radio buttons is it still possible to do? Quote Link to comment https://forums.phpfreaks.com/topic/18658-option-field-redirection/#findComment-80497 Share on other sites More sharing options...
AndyB Posted August 25, 2006 Share Posted August 25, 2006 http://javascriptkit.com/script/cutindex16.shtml - one of those is certainly what you want Quote Link to comment https://forums.phpfreaks.com/topic/18658-option-field-redirection/#findComment-80500 Share on other sites More sharing options...
ph34r007 Posted August 25, 2006 Author Share Posted August 25, 2006 thank you very much i found exactly what i needed, gonna bookmark that page :) Quote Link to comment https://forums.phpfreaks.com/topic/18658-option-field-redirection/#findComment-80503 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.