drop down menus

Status
Not open for further replies.

sridhar8310

Broken In
Recently I created a website for myself, I used the "select" HTML control and designed it, it's code is given below. Thee problem is that I can open up a page only when i change from one option to another but not when in the same option. Like in the "--header--" option in the menu is default selected, so if I press again header, it wont work since there is no change in the selection. Could anyone plz help me.
Also if u could tell me how to show the menu when we hover the mouse, I would be grateful to u.
-----------------------------------------------------------------------
<STYLE type=text/css>.networkbarselect {
FONT-SIZE: 11px; COLOR: #333333; FONT-FAMILY: Arial, Helvetica,sans-serif;BACKGROUND-COLOR: #f2f2f2
}</STYLE>

<SCRIPT language=JavaScript type=text/JavaScript>
function MM_jumpMenu(targ,selObj,restore){
var i;
i=selObj.selectedIndex;
selObj.selectedIndex=0;
eval(targ+".location='"+selObj.options[i.value+"'");
}</SCRIPT>

<select class=networkbarselect onchange="MM_jumpMenu('window.document',this,1)">
<option value=javascript:// selected>--header--</option>
<option value=*www.yahoo.com>yahoo</option>
<option value=*www.rediff.com>rediff</option>
</select>
----------------------------------------------------
 

icecoolz

Cyborg Agent
The select control behaves in the way which you have mentioned. Everytime you select an option in the control certain events get triggered and hence it implements whatever is there in the code of the event called. In your case since the --header-- is already selected even if you select it again nothing will happen as no even gets triggered.

As for your second option use DHTML menus. They give you lot more flexibility and look very pretty too! Loads of tools are available to build them. Just google it!
 

Deep

Version 2.0
*www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm


or

*www.opencube.com/nav_online.html (pretty good)

i hope this solves your problem
Deep
 
Status
Not open for further replies.
Top Bottom