When you submit it makes a comma delimited list of ID's that we loop over and 
use.

Some pages have one select on them, some pages have 10 selects on them.  So 
rather than making them uniquely named and tracking how many of them we just 
loop over the comma delimited list.




> -----Original Message-----
> From: Cutter (ColdFusion) [mailto:[email protected]]
> Sent: Thursday, July 30, 2009 11:38 AM
> To: cf-talk
> Subject: Re: OT javascript
> 
> 
> Why would you have two selects with the same name? Radio Buttons? Sure.
> But not selects...
> 
> Steve "Cutter" Blades
> Adobe Certified Professional
> Advanced Macromedia ColdFusion MX 7 Developer
> 
> Co-Author of "Learning Ext JS"
> http://www.packtpub.com/learning-ext-js/book
> _____________________________
> http://blog.cutterscrossing.com
> 
> 
> On 7/30/2009 10:19 AM, Chad Gray wrote:
> > 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]
> .value;
> > 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:325123
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to