Are you the originator of the code? I mean can you change the source code?
Because having two objects on the page with the same ID is bad mojo. I think
you're going to run into lots of problems, and inconsistencies in different
browsers if you keep them named the same.


andy 

-----Original Message-----
From: Chad Gray [mailto:[email protected]] 
Sent: Thursday, July 30, 2009 10:20 AM
To: cf-talk
Subject: OT javascript


Say I have two select inputs on one page and they are named the same.

<select name="ID>
<option value="">Please Select</option>
<option value="1">1</option>
</select>

<select name="ID>
<option value="">Please Select</option>
<option value="1">1</option>
</select>

I want to write javascript to check that both of these are not left blank or
in their default stage of "Please Select".

Can I do this in javascript ID[0] to get the value of the first one?

var
ID=document.orderForm.ID[0]options[document.orderForm.ID[0].selectedIndex].v
alue;
var
ID2=document.orderForm.ID[1]options[document.orderForm.ID[1].selectedIndex].
value;




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325122
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to