Jump to content

drop down menu using select


george
 Share

Recommended Posts

<select name="Cancer Facts" style="font-family: Arial; font-size: 13px" onchange="MM_jumpMenu('parent',this,0)">		<option value="http://www.cancerproject.org/diet_cancer/facts/factors.php" selected>Factors Contributing to

The select -> option code is not within form tags, because the javascript handels the event onchange. One can not select the first "selected" option.

Link to comment
Share on other sites

Is there supposed to be a question there somewhere or are you just giving out code?
How can I make the dropdown menu select the first option in a list of options, when the first option is pre-selected? In the example given, an onchange event is used.
<select name="Cancer Facts" onchange="MM_jumpMenu('parent',this,0)">		<option value="http://www.php1" selected>Option 1</option>		<option value="http://www.php2" >Option 2</option>

When the user tries to select the first item by clicking on it, nothing happens. Since the indexed item did not change, the onchange event is not triggered. I tried using the onmouseup event and the onclick event, and that was no help. How do I capture the event?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...