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 Quote Link to comment 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> Quote Link to comment 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.