I'm sorry if this is a little off topic. I have a form that has several checkboxes that pass an array to a PHP form handeler.
<input type="checkbox" name="books_ordered[]" value="book1">
<input type="checkbox" name="books_ordered[]" value="book2">
<input type="checkbox" name="books_ordered[]" value="book3">
This will send an array ($books_ordered) containing all of the books ordered, simple enough. I have some server-side form validation by running count() on the array (to make sure at least one book is checked). How would I do the same form validation in javascript (check the number in indexes in $books_ordered to make sure at least one book is selected)?
thanks