Webskater
11-13-2003, 01:29 PM
If you have some checkboxes (for example) on a form with the same name, you can find out how many there are using:
formname.controlname.length
If there is only one checkbox, instead of telling you the length is 1 (or 0 if it was zero based) it says that
formname.controlname.length is undefined.
It appears that a collection of form elements cannot exist if there is only one in the collection. Is this true or am I missing something?
It certainly seems to be true - does anyone know how I can determine how many elements there are in a collection including the situation where there is only one.
Thanks for any help.
formname.controlname.length
If there is only one checkbox, instead of telling you the length is 1 (or 0 if it was zero based) it says that
formname.controlname.length is undefined.
It appears that a collection of form elements cannot exist if there is only one in the collection. Is this true or am I missing something?
It certainly seems to be true - does anyone know how I can determine how many elements there are in a collection including the situation where there is only one.
Thanks for any help.