How to make a drop down menu.

.:.wolvie.:.

This snippet tells easily how to make a drop down menu! Easy as pie and quick too!

264 Views
About the Author
Ok, to start off... get your website ready that you 
want to put the drop down menu on.
 Then format it as you want it. 
Left, right, center... 
(left is <div align= left> YOUR CODES AND SUCH HERE</div> 
 center is <center> YOU CODES AND SUCH HERE</center> 
  right is the same as left but change left to right.)
Then type in this 
code but change the things around.
 for example...
<form name="gotolocation1" method="POST" ACTION=URI>
<select name="serchengines"> 
<option value="www.google.com">Google</option>
<option value="www.yahoo.com">Yahoo</option>
<option value="www.dogpile.com">Dogpile</option>
</select>
<input type="button" onClick="location =
document.gotolocation1.lissamenu1.options
[document.gotolocation1.lissamenu1.selectedIndex].value;"
value="Go">
</form>
 There's just one example, easy to change around. This one goes to google, yahoo, and dogpile.com . 
Well have fun with them!
Blade10878 0 Junior Poster in Training

i dont get it

mmiikkee12 1 Posting Whiz in Training

It makes a drop-down menu. The things in the <option> tags get added to the menu as options.

bajatmerc 0 Newbie Poster

explaining failure lol


Next time instead of saying "...change the things around." you should explain how to change it. People who are coming to read this explanation like myself can copy the code and see that it works. Knowing what was done or how to replicate it in a useful way is another matter though.

jangirke 0 Newbie Poster

It won't execute the URL

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.