Navigation Menu
Alphabetical Listing
Site Contents

Site FAQ
About JSS
JavaScript Forum
JavaScript Tutorial
Friends of JSS

Link to Us
JavaScript Help
Contribute a script
Technology Jobs

Become a Partner

Internet.commerce

Be a Commerce Partner














Internet.com

IT
Developer
Internet News
Small Business
Personal Technology

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


Social Bookmark

General

Use this script to produce select boxes that relate to one another. Choose an option in the first box and the script will change the available choices in the second box to match your selection. Easy to use, with comments.


Notes

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: unobtrusiveDSBoxes.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. Do not include more than two (2) lines of code in your comments. If you have suggestions or corrections, you can submit them to us.]

    
   
       
[optional]
 
[optional]

   

Comments feed Comment Feed RSS 2.0

6. From: tika
Correction!
01/23/2008 06:44:45

The previous comment I send is not correct!!!
This code works perfectly.
Thanks!!

3. From: Cindee
Thanks!
08/24/2007 21:36:22

I looked for hours trying to find a script that would help condense my drop drop boxes. This script is a dream come true! It works equally well on Explorer, Nescape and Mozilla. Well done!

Cindee

2. From: Larry
Thank you!
08/03/2007 01:14:22

I looked at a lot of js script for dependent drop downs, but they were all too complicated to understand. Thanks for this script and for keeping it simple. Using the class attibute was a great idea!
-- Larry

1. From: Renfield
How to make navigable
06/11/2007 12:34:27

Hi, great select boxes. How do you make them navigate to a page?

4. From: Jono
Auto Navigate
08/31/2007 08:56:59

1. Set your options for the first box
2. For the second box, where you would normally have the <select id="pda-type"> CHANGE IT TO THIS:
<select id="pda=type" onchange="window.open(this.options[this.selectedIndex].value,'_top')">

3. For each of your options in the second box:
<option value="YOUR URL">OPTION NAME</option>

Then when the user selects their second option it will automatically navigate to the value you gave.

5. From: Lee (Admin)
10/03/2007 15:26:47

Excellent idea, Jono! Works great!


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.