mikebyrne Posted December 12, 2007 Share Posted December 12, 2007 I want my optionlist to point to my php pages. How can I code this?? <html> <head> <title>Ass3</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head> <body bgcolor="#FFFF00"> <form name="myform" action="Ass3.asp" method="POST"> <div align="center"> <p> </p> <p><font size="+7">Database Maintenance </font></p> <p> </p> <p> </p> <p> <select name="mydropdown" size="1"> <option value="Select">Please Select Option</option> <option value="Add">Add a Project</option> <option value="Change">Change a Project</option> <option value="Delete">Delete a project</option> <option value="List">List all project details</option> </select> </p> <input type="submit" value="Go!"> </div> </form> </body> </html> I want Add to bring me to Add.asp, change to Change.asp etc Link to comment https://forums.phpfreaks.com/topic/81410-redirection-to-php-pages/ Share on other sites More sharing options...
phpQuestioner Posted December 12, 2007 Share Posted December 12, 2007 use a javascript onchange event in on your select menu. try something like this: <script language="javascript"> function takemethere(value) { document.location.href=""+value+".php"; } </script> <select name="mydropdown" size="1" onchange="takemethere(this.value)"> <option value="Select">Please Select Option</option> <option value="Add">Add a Project</option> <option value="Change">Change a Project</option> <option value="Delete">Delete a project</option> <option value="List">List all project details</option> </select> Link to comment https://forums.phpfreaks.com/topic/81410-redirection-to-php-pages/#findComment-413176 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.