I have set of images and checkboxes like below
<form name="food_type_form method="post" action="proc.php">
<img src="images/type_indian.jpg" alt="Select Indian food" />
<input type="checkbox" name="food_type[]" value="indian" />Indian
<img src="images/type_chinese.jpg" alt="Select Chinese food" />
<input type="checkbox" name="food_type[]" value="chinese" />Chinese
<img src="images/type_japanese.jpg" alt="Select Japanese food" />
<input type="checkbox" name="food_type[]" value="japanese" />Japanese / Sushi
<a href="#" onclick="document.food_type_form.submit()">Show Restaurants >></a>
</form>
When the image is clicked i want to CHECK the checkbox below that image. If the checkboxes have different name we can do it with document.myform.box1.checked = true;
But how to check if it is a set of checkbox
Edit 1
NOTE : <LABEL>
will not work, as i want to submit the form on image click.