Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 30th, 2005, 12:57 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default Complex Multiple Drop-Down Script

Hi All,

I have a somewhat complex script that I need help on; well, at least to me it is pretty complex. :-)

I have 7 drop-down selections. All with IDENTICAL "OPTION VALUE" but with different "SELECT NAME." In other words, I have 7 of the drop-downs below(but each with a different name: sundaymode, mondaymode, tuesdaymode, ect.)

<select name="sundaymode" id="sundaymode">
<option value = "0"> -Commute Mode-</option>
<option value = "1"> Weekend Day Off</option>
<option value = "2"> Vacation Day Off</option>
<option value = "3"> Sick Day Off</option>
</select>

Here is what i want the script to do. If a user select "Vacation Day off" twice from ANY of the 7 drop-down menus, he/she will get an error message saying "you can only select one "Vacation Day off." Please help. I truly don't know where to begin.

Thank you.

Leon

 
Old September 2nd, 2005, 02:30 AM
Authorized User
 
Join Date: Jul 2005
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Leon,

You can have a global JavaScript variable or a method to quickly scan the dropdowns to detect this.

 
Old September 20th, 2005, 08:34 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 212
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try this link. I wrote a script that did something similar to this.

http://p2p.wrox.com/topic.asp?TOPIC_...rms=holdingpen

HTH
Joe






Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting from multiple drop-lists Earl Hickey SQL Language 4 July 9th, 2008 03:34 PM
Selecting itme from drop down list in script hericles ASP.NET 1.0 and 1.1 Basics 7 August 21st, 2007 01:21 PM
Please Help me with Drag-n-Drop of multiple items vb_programmer Pro VB 6 9 October 7th, 2006 01:56 AM
Java script function on drop down list selection Sachin3k Javascript How-To 3 April 30th, 2005 11:30 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.