June 18th, 2002, 06:02 PM
The first set of checkboxes includes:
The second set of checkboxes is:
echo "<input type=\"checkbox\" name=\"Courses\" value=\"$rows[Crskey]\">\r\n";
And my Form is:
echo "<input type=\"checkbox\" name=\"Employee\" value=\"$row[Empkey]\">\r\n";
<form name="form" action="scheduledemp.php" method="POST" onSubmit='return checkform(form);'>
Thanks in advance for any assistance. Hope that this makes sense.
June 18th, 2002, 06:06 PM
what do you mean by "validate"? if they simply need to feel validated, i can give you the number of a good psychiatrist.
June 18th, 2002, 06:11 PM
If validation is unclear let me say it differently.....I need to check and see that at least one of the checkboxes is checked on each one of those sets.
June 18th, 2002, 06:18 PM
aha. that's much clearer.
for (var i=0; i<form.elements['Courses'].length; i++)
// found a Courses checkbox that was checked
you might be able to replace "form.elements['Courses']" with "form.elements.Courses". don't quote me on that, tho.
June 18th, 2002, 06:58 PM
Tried it but still doesn't work. I get a syntax error.
June 18th, 2002, 07:11 PM
1. try making the checkform() function take no parameters, then change all references to "form" inside that function to "document.form".
2. if that does nothing, post your checkform() function here.