CrazyJoe Posted October 26, 2006 Share Posted October 26, 2006 Here is my code. and i was wondering how do i make links in a drop down menu? <form size="1" height="1"/><select><optgroup label="Affilates"><option value="Purezc">Purezc</option><option value="Myspace">Myspace</option><option value="Photobucket">Photobucket</option></select></form> Link to comment Share on other sites More sharing options...
justsomeguy Posted October 27, 2006 Share Posted October 27, 2006 You need to use javascript to set window.location to the address you want to go to. If you make the value of the option the URL you want to go to, then you can just set window.location to the value of the selected option. Link to comment Share on other sites More sharing options...
CrazyJoe Posted October 27, 2006 Author Share Posted October 27, 2006 Can you give me an example of a code? Link to comment Share on other sites More sharing options...
Chocolate570 Posted October 27, 2006 Share Posted October 27, 2006 <form size="1" height="1"/><select><optgroup label="Affilates"><option value="http://your url.com" onclick="window.location=this.value;">Purezc</option><option value="Myspace">Myspace</option><option value="Photobucket">Photobucket</option></select></form>See what I did with your "Purezc" option? Link to comment Share on other sites More sharing options...
CrazyJoe Posted October 27, 2006 Author Share Posted October 27, 2006 And for the url Do i replace the url with my website url>? Link to comment Share on other sites More sharing options...
zachary Posted October 27, 2006 Share Posted October 27, 2006 Yes. Link to comment Share on other sites More sharing options...
CrazyJoe Posted October 27, 2006 Author Share Posted October 27, 2006 Thank you for your u guys. Link to comment Share on other sites More sharing options...
jesh Posted October 27, 2006 Share Posted October 27, 2006 With slightly less code, you can use: <select onchange="location.href = this.value;"> <option value="http://www.w3schools.com">W3 Schools</option> <option value="http://www.google.com">Google</option></select> Link to comment Share on other sites More sharing options...
Ruud Hermans Posted October 27, 2006 Share Posted October 27, 2006 With slightly less code, you can use:<select onchange="location.href = this.value;"> <option value="http://www.w3schools.com">W3 Schools</option> <option value="http://www.google.com">Google</option></select> How can I make it that this has a default value for example "list1" like if it's a button. Witch makes me ask the next question how do I make the arrow on the right dissapear?Ruud Hermans Link to comment Share on other sites More sharing options...
scott100 Posted October 27, 2006 Share Posted October 27, 2006 Witch makes me ask the next question how do I make the arrow on the right dissapear?You can't make it disapear, it's a browser feature when you use the <select> tag.You can create similar menu's using other techniques: http://www.w3schools.com/dhtml/tryit.asp?f...trydhtml_menu10 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now