carefree Posted October 15, 2007 Share Posted October 15, 2007 Not sure if this is the right place to post...all my pages are in php. Im trying to change my dropdown boxes to radio buttons but I cant get anywhere and its driving me insane Heres my original code: <?php if(!isset($_REQUEST['type']) || $_REQUEST['type']=="Web") { ?> <form name="form1" method="get" action="redir.php"> <table width="100%" height="3" border="0" cellpadding="0" cellspacing="0"> <tr > <td height="18" align="center"> <input name="search" type="text" id="search" value="<?php if(isset($_REQUEST['search'])) echo $_REQUEST['search']; ?>" size="60"> <input name="type" type="hidden" id="type" value="<?php echo $type; ?>"> <input class=search type="submit" name="Submit" value="Web Search"> </td> </tr> <tr > <td height="17" align="center"> <form> <span style="VERTICAL-ALIGN: bottom">Select a Platform: </span><select onchange="if (this.options[this.selectedIndex].value!='') location = this.options[this.selectedIndex].value;" name="menu"> <option value="javascript:Determine('Web','1');">Web</option> <option value="javascript:Determine('Images','0');">Images</option> <option value="javascript:Determine('Audio','0');">Audio</option> <option value="javascript:Determine('Video','0');">Video</option> <option value="javascript:Determine('News','0');">News</option> <option value="javascript:Determine('Sport','0');">Sport</option> <option value="javascript:Determine('Blogs','0');">Blogs</option> <option value="javascript:Determine('Forums','0');">Forums</option> <option value="javascript:Determine('Kids','0');">Kids</option> </select></td> </tr></table></form> I just want to change it to radio select buttons: <input type="radio" value="V1" checked name="R1"> I have no idea what im doing.....any ideas?? Quote Link to comment https://forums.phpfreaks.com/topic/73291-solved-change-drop-down-box-select-to/ Share on other sites More sharing options...
zq29 Posted October 15, 2007 Share Posted October 15, 2007 This is an HTML question, not a PHP one. Post up your attempt of changing the code and we can point out where you're going wrong. Quote Link to comment https://forums.phpfreaks.com/topic/73291-solved-change-drop-down-box-select-to/#findComment-369802 Share on other sites More sharing options...
carefree Posted October 15, 2007 Author Share Posted October 15, 2007 OK heres the original code: <?php if(!isset($_REQUEST['type']) || $_REQUEST['type']=="Web") { ?> <form name="form1" method="get" action="redir.php"> <table width="100%" height="3" border="0" cellpadding="0" cellspacing="0"> <tr > <td height="18" align="center"> <input name="search" type="text" id="search" value="<?php if(isset($_REQUEST['search'])) echo $_REQUEST['search']; ?>" size="60"> <input name="type" type="hidden" id="type" value="<?php echo $type; ?>"> <input class=search type="submit" name="Submit" value="Web Search"> </td> </tr> <tr > <td height="17" align="center"> <form> <span style="VERTICAL-ALIGN: bottom">Select a Platform: </span><select onchange="if (this.options[this.selectedIndex].value!='') location = this.options[this.selectedIndex].value;" name="menu"> <option value="javascript:Determine('Web','1');">Web</option> <option value="javascript:Determine('Images','0');">Images</option> <option value="javascript:Determine('Audio','0');">Audio</option> <option value="javascript:Determine('Video','0');">Video</option> <option value="javascript:Determine('News','0');">News</option> <option value="javascript:Determine('Sport','0');">Sport</option> <option value="javascript:Determine('Blogs','0');">Blogs</option> <option value="javascript:Determine('Forums','0');">Forums</option> <option value="javascript:Determine('Kids','0');">Kids</option> </select></td> </tr></table></form> And heres what im trying to do: <?php if(!isset($_REQUEST['type']) || $_REQUEST['type']=="Web") { ?> <form name="form1" method="get" action="redir.php"> <table width="100%" height="3" border="0" cellpadding="0" cellspacing="0"> <tr > <td height="18" align="center"> <input name="search" type="text" id="search" value="<?php if(isset($_REQUEST['search'])) echo $_REQUEST['search']; ?>" size="60"> <input name="type" type="hidden" id="type" value="<?php echo $type; ?>"> <input class=search type="submit" name="Submit" value="Web Search"> </td> </tr> <tr > <td height="17" align="center"> <input type="radio" value="javascript:Determine('Web','1');" checked >Web</input> <input type="radio" value="javascript:Determine('Images','0');">Images</input> <input type="radio" value="javascript:Determine('Audio','0');">Audio</input> <input type="radio" value="javascript:Determine('Video','0');">Video</input> <input type="radio" value="javascript:Determine('News','0');">News</input> <input type="radio" value="javascript:Determine('Sport','0');">Sport</input> <input type="radio" value="javascript:Determine('Blogs','0');">Blogs</input> <input type="radio" value="javascript:Determine('Forums','0');">Forums</input> <input type="radio" value="javascript:Determine('Kids','0');">Kids</input> </td> </tr></table></form> Quote Link to comment https://forums.phpfreaks.com/topic/73291-solved-change-drop-down-box-select-to/#findComment-369812 Share on other sites More sharing options...
zq29 Posted October 15, 2007 Share Posted October 15, 2007 Well that code appears to be generating radio buttons, what is it about the radio buttons is not working for you? Quote Link to comment https://forums.phpfreaks.com/topic/73291-solved-change-drop-down-box-select-to/#findComment-369815 Share on other sites More sharing options...
carefree Posted October 15, 2007 Author Share Posted October 15, 2007 I wanted to selct a radio button and it changes like the dropdown boxes do kinda like a hyperlink I was looking at : <select onchange="if (this.options[this.selectedIndex].value!='') location = this.options[this.selectedIndex].value;" name="menu"> And thought i might be alble to do this with radio buttons Quote Link to comment https://forums.phpfreaks.com/topic/73291-solved-change-drop-down-box-select-to/#findComment-369819 Share on other sites More sharing options...
carefree Posted October 15, 2007 Author Share Posted October 15, 2007 Heres also a link to the site: http://www.search-blue.com You can see what its doing there Quote Link to comment https://forums.phpfreaks.com/topic/73291-solved-change-drop-down-box-select-to/#findComment-369820 Share on other sites More sharing options...
carefree Posted October 15, 2007 Author Share Posted October 15, 2007 Found the solution: <input type="radio" onclick="javascript:Determine('Web','1');" checked>Web</input> <input type="radio" onclick="javascript:Determine('Images','0');" >Images</input> <input type="radio" onclick="javascript:Determine('Audio','0');">Audio</input> <input type="radio" onclick="javascript:Determine('Video','0');">Video</input> <input type="radio" onclick="javascript:Determine('News','0');">News</input> <input type="radio" onclick="javascript:Determine('Sport','0');">Sport</input> <input type="radio" onclick="javascript:Determine('Blogs','0');">Blogs</input> <input type="radio" onclick="javascript:Determine('Forums','0');">Forums</input> <input type="radio" onclick="javascript:Determine('Kids','0');">Kids</input> </td> Thanks for the help guys Quote Link to comment https://forums.phpfreaks.com/topic/73291-solved-change-drop-down-box-select-to/#findComment-369835 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.