find out if a control is part of an array - javascript
Posted: Fri Jun 03, 2005 1:23 am
Hi all, just a quick problem I am trying to solve, I have a few checkboxes in a form and when a user ticks on, it loops through, checks the checked status and performs an action according to that.
That works fine if there are multiple checkboxes, but in the instance of there only being one, it comes to the loop ...
... it just passes over without doing anything.
How can I tell if there is only one?
Cheers
That works fine if there are multiple checkboxes, but in the instance of there only being one, it comes to the loop ...
Code: Select all
for (var i=0; i<control.form.add_ing.length; i++){How can I tell if there is only one?
Cheers