Hi guys and gals,

  I'm trying to validate a checkbox element in a form.  Due to using php
to process this form, the checkbox element must have a name ending in
square brackets...

<input type="checkbox" value="somevalue" name="somename[]" />

The problem I'm having is trying to loop thru this element to see if at
least one of the boxes are checked....

for ( i = 0; i < document.forms[0].elements['somename[]'].length; i++ )
{
    alert ( document.forms[0].elements['somename[]'][i].checked );
}

This gives me an error.  What's the proper syntax for this? 

____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:wdvltalk-join@;lists.wdvl.com 
       Send Your Posts To: [EMAIL PROTECTED]
To change subscription settings to the wdvltalk digest version:
    http://wdvl.internet.com/WDVL/Forum/#sub

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to