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
Solved

"on change"?

Posted on 2002-06-19
7
138 Views
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?
0
Comment
Question by:Reighn21
7 Comments
 
LVL 12

Expert Comment

by:lexxwern
ID: 7093203
these both events will help you.

<select onchange="javascriptfunction()">

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

Expert Comment

by:dorward
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
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
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.

Cd&
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 30

Expert Comment

by:third
ID: 7094746
like,

<form>
<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>
</select>
</form>

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

Accepted Solution

by:
third earned 50 total points
ID: 7094749
btw,

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
0
 
LVL 4

Expert Comment

by:daluu
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>
</SELECT>
</FORM>
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
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

Cd&
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

This article discusses four methods for overlaying images in a container on a web page
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

809 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