"on change"?

Posted on 2002-06-19
Medium Priority
Last Modified: 2010-04-09
Anyone know of a way or a script that will allow a dropdown menu to open a link without having to hit a submit button? like an onchange command or something?
Question by:Reighn21
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 12

Expert Comment

ID: 7093203
these both events will help you.

<select onchange="javascriptfunction()">

<select onblur="javascriptfunction()">
LVL 17

Expert Comment

ID: 7093624
Be VERY careful, some people use the keyboard for navigation, this could trigger the change everytime they try to LOOK at another option.

If you are going to use a <select> as a navigation tool then this is _essential_ reading: http://www.cs.tut.fi/~jkorpela/forms/navmenu.html
LVL 53

Expert Comment

ID: 7093915
<select onChange="this.form.submit()">

Not recommended because the other form fields cold be empty.

If you use it, it is s agood idea to have a default pre-selected option.

7 Extremely Useful Linux Commands for Beginners

Just getting started with Linux? Here's a quick start guide that has 7 commands that we believe will come in handy.

LVL 30

Expert Comment

ID: 7094746

<select onchange="window.open(this.options[this.selectedIndex].value);">
 <option value="http://www.yahoo.com">yahoo</option>
 <option value="http://www.google.com">google</option>

but be warned of what dorward has emphasized on his comment.
LVL 30

Accepted Solution

third earned 200 total points
ID: 7094749

please maintain your open questions and review the guidelines on grading,

Questions Asked 9
Last 10 Grades Given B B C B  
Question Grading Record 4 Answers Graded / 4 Answers Received

Expert Comment

ID: 7097258
Another similar method to the ones posted:

<FORM NAME="GoList">
<SELECT NAME="list" onChange="window.location=this.options[this.selectedIndex].value">
<option>Make a selection</option>
<option value="default.htm">Back to Home Page</option>
<option value="resume.htm">View my Resume</option>
LVL 53

Expert Comment

ID: 7100733
To any user who picks this PAQ up off of a search: the accepted answer may not be very useful. The comment that address the problem is the comment from third at 06/19/2002 09:36PM PST


Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Find out what you should include to make the best professional email signature for your organization.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

766 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question