Hello, this is my very first post. Sort of like ‘Hello World’.
From a form a user can check boxes for items.
(I’m using PHP but this is a JavaScript problem.)
They are passed to another page where they are assigned like this
$wa = purchase item one
$wb = purchase item two
$wc = purchase item three
$wd = purchase item four
$we = purchase item five
now if any of the items are “true” then I assign like this
if($wa = “true”) {
$wa = “checked”;
}
if($wb = “true”) {
$wb = “checked”;
}
And on the page a table is populated this way
<form "myform">
<table><tr>
<td><input type="checkbox" name="$keepA[zero]" value=1 <?php echo $wa; ?>>  item 1></td>
<td><input type="checkbox" name="$keepB[one]" value=2 <?php echo $wb; ?>>  item 2</td>
<td><input type="checkbox" name="$keepC[two]" value=3 <?php echo $wc; ?>>  item3</td>
<td><input type="checkbox" name="$keepD[three]" value=4 <?php echo $wd; ?>>  item4</td>
<td><input type="checkbox" name="$keepE[four]" value=5 <?php echo $we; ?>>  item5</td></tr>
</table>
<form>
and it might look something like this
<form = "myform">
<table> <tr>
<td><input type="checkbox" Id="check0" name="$keepA[zero]" value=1 checked>  item1</td>
<td><input type="checkbox" Id="check1" name="$keepB[one]" value=2>  item2</td>
<td><input type="checkbox" Id="check2" name="$keepC[two]" value=3 checked>  item3</td>
<td><input type="checkbox" Id="check3" name="$keepD[three]" value=4>  item4</td>
<td><input type="checkbox" Id="check4" name="$keepE[four]" value=5 checked>  item5</td></tr>
</table>
</form>
Notice that item1, item3 and item5 are assigned as checked and the check boxes are indeed checked.
If the user decides now to uncheck all the boxes and hit the submit button my option is to generate an error page which I have already done. I could pass forward as hidden the information from the first set of entries and pass them back to repopulate this form again (which I have not yet done). I would like to have a javascript alert pop up when no boxes are checked. Also, I would like to capture in javascript what would already be checked in the table directly above as I believe this is what is causing me grief.
I understand that I could do like most and have a page with the items only and forego the second form but I have a bone and would like to figure this out.
I am bleary eyed. I cannot get this to work. I would appreciate any suggestions.
Thank you