Hi everybody,
I am using paging in one of my websites,
in each page there are 9 images with checkbox for each one.
I want to be able to check lets say 3
of the boxes from the first page
and two of em from the second one
then I will submit the selection of these
checkboxes when I am done.
My best guess was calling a javascript function on each checkbox that stores its value in a session.
My problem is that I am noooo good in javascript and I really need your help.
One more thing that the checkboxes are
being created using a loop and array
Code sample:
<script language="javascript">
function checkthebox()
{
if(document.forms[0].elements['Select_Item[0]'].checked=true)
{
alert(document.forms[0].elements['Select_Item[0]'].value)
}
else
{
document.forms[0].elements['Select_Item[0]'].checked=true
alert('The box was not checked so I have checked it!');
}
}
</script>
while ($count<$PageLimit){
echo("<INPUT onClick='checkthebox(this.value);' TYPE=CHECKBOX NAME='Select_Item[$count]' VALUE='$PartNum[$count]'>");
}
I know that my code is a mess
please help