troubleshooting Question

Monitor Multiple Selects for Change but not default value, Using JavaScript?

Avatar of MJ
MJFlag for United States of America asked on
JavaScript
2 Comments1 Solution69 ViewsLast Modified:
How do I monitor multiple selects, using JavaScript,  to see and get the value, if it has changed and it is NOT "Choose one" (top selection with no value) ? I can not add "onchange" event directly to the select  mark-up.

 
<select id="mainForm1" name="mainForm1" size="1">	<option value="">-- Choose one --</option>
	<option value="EMPLOYED">Employed</option>
	<option value="SELFEMPLOYED">Self-employed, Business owner</option>
	<option value="UNEMPLOYED">Not employed, Homemaker, Student</option>
	<option value="RETIRED">Retired</option>
</select>
<select id="mainFormA" name="mainFormA" size="1">	<option value="">-- Choose one --</option>
	<option value="val1">First Selection</option>
	<option value="val2">Second Selection</option>
	<option value="val3">Third Selection</option>
</select>
FYI.. I nnderstand how to do it for a single select but I'm wondering if there is an easier way to handle multiple selects at  the same time?
Thanks!
ASKER CERTIFIED SOLUTION
David S.
Consultant & Challenge Subduer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Top Expert 2009

The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros