Multi-Value Drop Down List 2
General
This script provides a selection in a dropdown menu, determined by the user's previous selection. Easy to implement and customize. Could be used with other dynamic languages, such as JSP or ASP. The arrays could be created by information fetched from a database.
Notes
- Created by: Kiran Pai
- Web Site: http://www.codecoffee.com/
- Posted: July 16, 2008
Source Code
Paste this source code into the designated areas.
External file
Paste this code into an external JavaScript file named: multiValueForm.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


Leave a Response
(3 comments)Just what I was looking for, thank you.
Nice addition to scripting code[br /][br /]I modified it slightly to read in external JS file of data[br /]to make it easier for upkeep without changing main code.[br /][br /]Good job!
Thanks for the script. This is a great effect for many hierarchical choices: cities in states, divisions within companies.[br /]I think you should handle the case where the user picks the "Select One" choice after having selected "Blues" or "Rock" previously. We typically clear the second select's choices. Or you might remove the "Select One" choice after "Blues" or "Rock" is chosen.