You can in FF3. You have some typos that'll stop it working though.
A closing double quote for the name attribute in your selects. You need a . in between the [0] options. Have a look at using jQuery though. It'll make this code a lot smaller. Adrian > -----Original Message----- > From: Chad Gray [mailto:[email protected]] > Sent: 30 July 2009 16:20 > 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].selectedInd > ex].value; > var > ID2=document.orderForm.ID[1]options[document.orderForm.ID[1].selectedIn > dex].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:325121 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

