NameSilo

Just a question

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
Spacemail by SpaceshipSpacemail by Spaceship
Watch

papas

New Member
Impact
0
Hi I ve been trying to figure out how to create drop down menus for my site .........download freeware nad shareware but still cofusing -can someone tell me how I can make nice looking drop down menus and if I need software which one is the easiest to use ??????? Than you:|

Papas- Sweden
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
do you mean just normal dropdown form menu's?
 
0
•••
Dont' buy any software for this easy to do task!

See the below code for the anatomy of a 'drop down' select box.

You'll need some sort of script -Java Script, PHP, Perl, etc. - to handle the HTTP request once it hits the server.

You might want to remove the comments to make it easier to see what the code is doing.

Code:
 <!--Open with the 'form' tag-->
 <!--Set 'action' to some script that will handle submitted variables-->
 <!--Set 'method' depending upon type of http request *seek more info on this topic-->
 <form action="some-script.php" method="post">
    <!--Open with 'select' tag-->
    <select name="select1">
		  <!--Open and close 'option' tags accordingly--> 
			<!--Use 'selected' to 'select' wich option will be displayed in window-->
			<option value="op1" selected>Option 1</option>
			<option value="op2">Option 2</option>
			<option value="op3">Option 3</option>
    </select>
		<!--Close with 'select' tag-->
 </form>
 <!--Close with the 'form' tag-->

This will produce: http://www.ebigman.com/test/drop-example.html

Next is the script to handle the variables produced. Which scripting language are you using?
 
Last edited:
0
•••
painperdu, thats cool. Im gonna use ur code on my site thanks.
 
0
•••
You'll also need a Javascript snippet to handle the form properly...
 
0
•••
Here is the same code as above except that we now call
JavaScript's 'location' object and 'OnChange' event handler
to create a clent side script that points the browser to some
other URL on the web.

Code:
<form name="throw_me" action="script.php" method="post">

<select name="somewhere" 
OnChange="location.href=throw_me.somewhere.options[selectedIndex].value">
<option selected>Select a site to visit . . .</option>
<option value="http://www.ebigman.com">Throw Me To Ebigman.com</option>
<option value="http://www.yahoo.com">I'd Rather Go To Yahoo!</option>
<option value="http://www.namepros.com/appraisals.php?s=">Appraise My Name Please</option>
</select>
<br />
<input type="reset" value="Refresh Me" />
</form>

See it in action here: http://www.ebigman.com/test/drop-example.html
 
0
•••
humm.. you can use ... java script for that... it will be more... pro and eye catching...
 
0
•••
Dynadot — .com TransferDynadot — .com Transfer
Truehost — .com domains from $4.99, hosting includedTruehost — .com domains from $4.99, hosting included

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back