Navigation Menu

Site Contents
What's New?


Site FAQ
About JSS
JavaScript Forum
JavaScript Tutorial
Friends of JSS

Link to Us
JavaScript Help
Contribute a script
Technology Jobs

Internet.commerce

Partner With Us
Phone Cards
Hurricane Shutters
Online Education
Data Center Solutions
Holiday Gift Ideas
Home Improvement
Promote Your Website
Calling Cards
Corporate Awards
Promotional Products
Shop
Logo Design
Promotional Golf
Imprinted Promotions

Internet.com

IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Developer Channel

FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

Great Sites

DocJavaScript.com
dhtml.com
The Freebie Directory
TheFreeSite.com

Browse Doc JS's Tips!


Hiermenus Central


Promotions

Free Announcements


General

Automatically adjusts the values in the selection box depending on the item selected in the drop down menu. Awesome!



Notes

  • Created by: Jerome Caron
  • Posted: March 23, 2001

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: autoDropDown.js


Head

Paste this code into the HEAD section of your HTML document.


Body

Paste this code into the BODY section of your HTML document


User Comments

Add a comment, suggestion, or correction
[For questions about usage, consult the Notes tab above or visit the JavaScript forum]

    
   
       
[optional field]
 
[optional field]

   

Comments feed Comment Feed RSS 2.0

12. From: Boris
Numbers After Names
01/19/2008 21:23:45

Thanks a lot for your contribution!
What is the significance of the numbers after each athlete's name? Are they random? I was trying to change the Team/Athlete format to a country/province format, but when I copied the numbers again, the script stopped working,

Thanks for your input

13. From: Lee Underwood (Admin)
01/29/2008 13:08:28

To tell you the truth, I'm not sure what the numbers are for. I removed them and it worked fine, i.e.,

new Array("Marian Hossa"),

There is a script already written for what you want to do.

10. From: WzCocoon
is it possible to adda 3rd options?
12/20/2007 02:10:03

I love you code thanks,

I would like to know if it is possible to add a 3rd option to select from based on the second select?

is it possible to add a 3rd options?

11. From: Lee Underwood (Admin)
01/29/2008 11:53:19

Sure, but you would need to rewrite the script. Due to the limitations of these comments, you will need to submit your question to the JavaScript Forum for further help.

9. From: Niloy
10/04/2007 14:28:27

This is a very good site for java script.

8. From: Patrice
Awesome!
10/04/2007 09:51:27

Thank you, Jerome. This was exactly what I needed for a base for a way to navigate 40+ options in a voting script. I made my customization changes and added a go_now function, and it's perfect!

Thank you again!

7. From: Laura
auto drop down without the select option?
07/26/2007 11:45:09

Hi Jerome,

Your code for the auto drop down is great.

I've got it to work for me, but am trying to make an adjustment.

Actually I should start by asking a very general question: Is it possible to create the same drop down without a select option field?

I've been playing with the code and noticed that it seems to work based on the select (that is interpreted as null) being present.

Before I spend anymore time on it, I am just wondering if what I am trying to accomplish is possible.

If so, and you could give me any other suggestions, I would appreciate it.

-Laura

5. From: Philippe Sambor
The same with Ajax ?
06/13/2007 11:31:04

How to apply this concept for delivery charge calculation within a checkout form without refresh?

Scenario of connected pull-down boxes as follows:
First pull-down element (Home delivery or Self Collect)
Second pull-down element (zip code or area name)
Third element is a non editable textarea (pickup address or instructions) depending on the second level.

Based on the first selection (Home or self collect), how to get a flag on the fly ( yes or no) to apply or not apply a delivery charge before checkout submit?

6. From: Lee (Admin)
07/10/2007 15:35:48

You need to submit your question to the JavaScript Forum.

3. From: Richard
05/14/2007 17:50:08

This code does not work with Mozilla. It works great with IE, but does nothing in Mozilla. Also would like to see the ability to have a third layer where the second set of options feeds a third set of options.

next comments...

Do you write JavaScripts?
If you do, why not submit them to us?
We'll give you credit and a link back to your Web site.