skaterdav85 Posted April 30, 2008 Share Posted April 30, 2008 I have a html form drop down menu, and i wanted to make it so that when an option is selected, it automatically goes to a particular link. How do i put links into this code? Thanks! <select name="select" size="1" id="select"> <option selected>Select an Option</option> <option>Option 1 </option> <option>Option 2</option> <option>Option 3</option> </select> Link to comment Share on other sites More sharing options...
Ingolme Posted April 30, 2008 Share Posted April 30, 2008 Put the URL in the option value and write the code as follows: <select onchange="location.href=this.value" size="1"><option selected="selected">Select an Option</option><option value="http://www.google.com">Google</option><option value="http://www.yahoo.com">Yahoo!</option><option value="http://www.w3schools.com">W3Schools</option></select> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.