Ok, say I have checkboxes like so:
<input type="checkbox" name="class[]" value="name 1">
<input type="checkbox" name="class[]" value="name 2">
<input type="checkbox" name="class[]" value="name 3">
How can I make the following script work:
<script type="text/javascript">
checkboxlimit(document.forms.morning.class[], 2)
</script>
If I leave the [] within the javascript, it becomes a syntax error. Is there a way of having those brackets in there or should that JS line be written another way?