Hi there.

This control function Button1_onclick() for checkboxes in the my form not working, why?
Can u help me?

Code:
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
 
    <script language="javascript" type="text/javascript">
// <!CDATA[
 
function Button1_onclick() 
{
    if (!controllo_check())
    {
         alert("Stop");
        return;
    }
    document.forms[0].submit();
 
}
 
 
function controllo_check()
{
    var cks = document.forms[0].chkParent;
    var checked = false;
    for(var i = 0; i < cks.length; i++)
    {
        if(cks[i].checked)
        {
            checked = true;
            break;
        }
    }
    return checked; 
 
}
 
 
// ]]>
    </script>
 
</HEAD>
<title>Multiple checkbox select sample</title>
<BODY>
 

<form name=frmTest action="default-2.asp" method=POST onsubmit="return(Button1_onclick(this));" >
 
<input type=CHECKBOX name=chkParent1 value="3742">karla_c26<br>
 
<input type=CHECKBOX name=chkParent2 value="4430">AleAlvarez<br>
 
<input type=CHECKBOX name=chkParent3 value="3303">Alejandra<br>
 
<input type=CHECKBOX name=chkParent4 value="3720">Angio<br>
 
<input type=CHECKBOX name=chkParent5 value="3">gino<br>
 
<input type=CHECKBOX name=chkParent6 value="4606">Andrea<br>
 
<input type=CHECKBOX name=chkParent7 value="3962">alx<br>
 
<input type=CHECKBOX name=chkParent8 value="4095">ANGELADAUTO<br>
 
<input type=CHECKBOX name=chkParent9 value="7">cas<br>
 
<input type=CHECKBOX name=chkParent10 value="8">assim<br>
 
<input type=HIDDEN name=txtCount value="10">
<p><input type=SUBMIT value="Select"></p>
</form>
</BODY>
</HTML>