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
Moderator: General Moderators
Code: Select all
for (var i=0; i<control.form.add_ing.length; i++){Code: Select all
alert(control.form.add_ing.length);Code: Select all
if (isNaN(control.form.add_ing.length)) do stuff