As an overview, in the onChange call a function that loops through all the
other selects and checks their selected values/indexes(which ever makes more
sense)

elements = new Array(
getElementById('select_1'),
getElementById('select_2'),
getElementById('select_3'),
getElementById('select_4'),
...
...
);

Then a function that you call with onChange of all those selects.

for (....) {
if elements.selected index/value = the current selected index/value {
alert("something");
}
}

Hows about that?

Ade

-----Original Message-----
From: Tony Weeg [mailto:[EMAIL PROTECTED]
Sent: 17 August 2004 00:01
To: CF-Talk
Subject: ot: _javascript_ question

hello good peoples...

i have a _javascript_ question, that really aims for a coupla things...

1. can this be done elegantly?
2. if not, then whats the best non-elegant way?
3. if so, a bit of a point in the right direction...i can READ
_javascript_, most of the time, and tell ya whats going on...however, i
SUCK, with a capital freakin' S at writing it...anyway, im sick of
bugging mike t. all the time with my _javascript_ questions...so i
figured i try here, and im sure he'll read this...but whatever, :)

anyway...

i have, lets say...

1. 15 select elements on a page.
2. each is named uniquely.
3. all are filled with 1-15 as the values (indexes 0-14)
4. if a user chooses, 14 in element 1 (index 0) i need to prevent them
from choosing 14 in ANY other element.

i (think) i can do it with something sort of LONG and VERY unelegant inline
(this.selectedIndex==0){2.something.Whatever};"
onChange() event, but i think there has to be a BETTER way to do it.

id love to learn this, is there a place to get this kind of _javascript_
learning?  ive picked up EVERY thing i can about a lot of web
programming languages, just cant crack the _javascript_ code...

help ??? :)

cheers.
--
tony

Tony Weeg
human.
email: tonyweeg [at] gmail [dot] com
blog: http://www.revolutionwebdesign.com/blog/

Check out http://www.antiwrap.com to send websites to your friends.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to