BareFoot
October 1st, 2004, 04:03 AM
I'm a newbie in Javascript. I am currently coding in php. I have a form in html and I want to validate an array of checkboxes before submitting the form. The usual way of validating checkboxes doesn't work cos i'm using array for this set of checkbox.
Any advice is very much appreciated. Thank you in advance.
The code extract for the HTML is as following:
<tr>
<td colspan=2> 5. Will you be providing us any content or material for this project? Please select all that apply.</td></tr>
<tr> <td> </td><td> <input type="checkbox" name="material[]" value="text">Yes, text content</td></tr>
<tr> <td> </td><td> <input type="checkbox" name="material[]" value="graphics or pictures">Yes, graphics or pictures</td></tr>
<tr> <td> </td><td> <input type="checkbox" name="material[]" value="streaming audio/video">Yes, streaming audio/video files</td></tr>
<tr> <td> </td><td> <input type="checkbox" name="C1" value="zero">No, not at all.</td>
</tr>
I want to validate the material[] checkboxes. Please help!
-------------~Philosophy~----------------------
I shall pass this way but once, any good I can do,
any kindness I can show, let me do it now,
for I shall not pass this way again.
Any advice is very much appreciated. Thank you in advance.
The code extract for the HTML is as following:
<tr>
<td colspan=2> 5. Will you be providing us any content or material for this project? Please select all that apply.</td></tr>
<tr> <td> </td><td> <input type="checkbox" name="material[]" value="text">Yes, text content</td></tr>
<tr> <td> </td><td> <input type="checkbox" name="material[]" value="graphics or pictures">Yes, graphics or pictures</td></tr>
<tr> <td> </td><td> <input type="checkbox" name="material[]" value="streaming audio/video">Yes, streaming audio/video files</td></tr>
<tr> <td> </td><td> <input type="checkbox" name="C1" value="zero">No, not at all.</td>
</tr>
I want to validate the material[] checkboxes. Please help!
-------------~Philosophy~----------------------
I shall pass this way but once, any good I can do,
any kindness I can show, let me do it now,
for I shall not pass this way again.