Drop Down Menu - drop down menu with java script
I'm implementing a drop down menu to be used with various products so that I can save some space in the products section of this particular site.
Here's an example of the java:
<SCRIPT LANGUAGE='JavaScript' TYPE='text/javascript'>
<!--
if (document.images) {
Ilogo = new Image(100, 17);Ilogo.src='images/something_home.gif' ;
Ilogo_over = new Image(100, 17);Ilogo_over.src='images/something_home_over.gif' ;
;}
function di(id,name) {
if (document.images) {
document.images[id].src=eval(name+".src");}}
// -->
</SCRIPT>
--------------------------
Here's an example of the drop down:
<form name="herbals">
<span class="indexHead">Herbals</span><br>
<select name="item" onChange ="go(document.herbals.item)">
<option value="">Select one...
<option value="herbals/acuity.html">Acuity Plus
<option value="herbals/alfalfa.html">Alfalfa Tabs
<option value="herbals/dtx.html">DTX
<option value="herbals/echinacea.html">Echinacea Complex
<option value="herbals/garlic.html">Garlic
<option value="herbals/gla.html">GLA Plus
<option value="herbals/moodlift.html">Moodlift
<option value="herbals/optiflora.html">Optiflora
<option value="herbals/osteokinetics.html">Osteokinetics
<option value="herbals/saw_palmetto.html">Saw Palmetto Plus
<option value="herbals/valerian.html">Valerian Plus
</select><br>
<span class="indexBody">Formulas you can trust</span>
</form>
<p></p>
--------------------------------------
I thought this would be fairly simple but I'm stumpped on it.
Could someone give me a bit more info on this script/drop down and let me know how 2 set it up?
Thanks for the time!!!!
JP Stones posted this at 18:28 — 8th July 1999.
They have: 2,390 posts
Joined: Nov 1998
I did not check but I assume it does not work, if not just go to, say, www.javascript.internet.com and get a functional one.
If there is another problem, please repost.
Hope that helped?
JP
----------
The Webmaster Promotion and Resource Center.
http://www.what-next.com
shpek posted this at 17:32 — 9th July 1999.
They have: 66 posts
Joined: Apr 1999
Thanks for the suggestions!!!...I'll try them out.
dflydsgn posted this at 01:10 — 10th July 1999.
They have: 19 posts
Joined: Jun 1999
Shpek, I do drop down menus a little differently, if we are talking about the same thing. This is the code in the <head>
<SCRIPT language="JavaScript"><!--
function jump(){
var loc=document.navigation.navigate.options [document.navigation.navigate.selectedIndex].text;
if (loc == "home"){
location="index.html";
}else if (loc == "About Us"){
location="aboutus.html";
}else if (loc == "Contact Us"){
location="contact.html";
}
}
// -->
</SCRIPT>
The code in the body
<FORM name="navigation">
<SELECT name="navigate" size="1" onchange="jump()">
<OPTION value="">Shortcuts...
<OPTION value="">Home
<OPTION value="">About Us
<OPTION value="">Contact Us
</SELECT>
</FORM>
With this code, you don't need a go button, it will go to the page with just the change of the menu bar.
Hope this helps
----------
www.dragonfly-design.com
Affordable, high quality web design
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.