#1
|
||||
|
||||
HTML Drop-down Menu
Just a heads-up, this isn't the epic drop-down menu you've seen on some site, this is a simpler one, and it would look something like this:
Also, I'm not very good at making tutorials (this is my second one EVER) so it might be hard to understand or something like that. Anyway.... 1. Set up the basic html tags: head, body, footer, etc. Choose where you want the menu, and set up the alignment tags or whatever you want to make sure it goes where you want it to go. 2. Copy and paste this code within the tags where you want it to go. Don't modify this code; it sets up the browser so it knows that you're going to add a menu, not the links and junk. Code:
<SCRIPT TYPE="text/javascript"> <!-- function dropdown(mySel) { var myWin, myVal; myVal = mySel.options[mySel.selectedIndex].value; if(myVal) { if(mySel.form.target)myWin = parent[mySel.form.target]; else myWin = window; if (! myWin) return true; myWin.location = myVal; } return false; } //--> </SCRIPT> <FORM ACTION="" METHOD=POST onSubmit="return dropdown(this.gourl)"> <SELECT NAME="gourl"> <OPTION VALUE="">Random Page <OPTION VALUE="/tags/" >Random Page <OPTION VALUE="/" >Random Page <OPTION VALUE="http://www.ninthwonder.com" >Random Page </SELECT> Code:
<FORM ACTION="" METHOD=POST onSubmit="return dropdown(this.gourl)"> <SELECT NAME=""> <OPTION VALUE="">Random Page <OPTION VALUE="">Random Page <OPTION VALUE="">Random Page <OPTION VALUE="">Random Page </SELECT> <INPUT TYPE=SUBMIT VALUE="Go"> </FORM> A) Code:
<FORM ACTION="" METHOD=POST onSubmit="return dropdown(this.gourl)"> <SELECT NAME="hi"> <OPTION VALUE="">Random Page B) Code:
<OPTION VALUE="">Random Page <OPTION VALUE="">Random Page <OPTION VALUE="">Random Page </SELECT> <INPUT TYPE=SUBMIT VALUE="Go"> </FORM> 5. Test out your menu, modify the code, and perfect your website! Questions? Problems? I've practiced a lot with the drop-down script so I can most likely help. :)
__________________
Just because we all use the same script doesn't mean our websites can't be unique. Please visit Shop 12. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Drop Down List to Use Item Messed Up | Abronsyth | Questions and Supports | 4 | 12-30-2014 10:37 AM |
Creating a drop down list within FORM to SHOW | FounderSim | Questions and Supports | 6 | 09-27-2014 04:39 PM |
How to edit both menu's? | Skaiya | Questions and Supports | 6 | 04-01-2014 03:03 PM |
Too many drop down bars? | Infernette | Questions and Supports | 4 | 01-29-2013 04:01 PM |
Drop-down menu for myadopt.php [SOLVED] | arlecchina | Questions and Supports | 16 | 10-09-2009 08:10 AM |
What's New? |
What's Hot? |
What's Popular? |