justravis Posted August 17, 2007 Share Posted August 17, 2007 First, i did not need to pass the form name to any of my other validation functions, but is it necessary when dealing with checkbox arrays? Second, I tried 2 different approaches to figuring out if any checkboxes in the array are checked, but none of them work. function check_req(form, field, alerttext) { /*count_checked=0; for(i=1; i<field.length;i++) { if(field.checked==true) { count_checked++; } } if(count_checked==0)*/ if(form.field.checked==false) { alert(alerttext); return false; } } http://www.powerontechnologies.com/_sites/vsd/savy/savy.pwr Any ideas? THANKS! Link to comment https://forums.phpfreaks.com/topic/65463-checkbox-array-function/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.