hi list..
i want to do validation for checkbox, where the user must select atleast one checkbox.. my asp code looks like this
------
<form action="admin_chancepack.asp" name="form" method=post onSubmit="return CheckPack(this)">
------
<%
Do while Not RS.EOF
iCount = iCount + 1 %>
<tr bgcolor="eeeeee">
<td><input type=CHECKBOX name=checkitem<%=iCount%> value"<%=RS("pid"%>">
</tr>
<%
RS.Movenext
Loop
------
<input type=HIDDEN name=txtCount value="<%=iCount%>">
<p><input type=SUBMIT value=submit></p>
------
the problem is i don't know how to write the validation in javascript..
function CheckPack(form) {
{
for i=1; i<=document.form.txtCount.value; i++) {
??????????
}}
please help..
thanks a lot..
rgds,
parames.s
i want to do validation for checkbox, where the user must select atleast one checkbox.. my asp code looks like this
------
<form action="admin_chancepack.asp" name="form" method=post onSubmit="return CheckPack(this)">
------
<%
Do while Not RS.EOF
iCount = iCount + 1 %>
<tr bgcolor="eeeeee">
<td><input type=CHECKBOX name=checkitem<%=iCount%> value"<%=RS("pid"%>">
</tr>
<%
RS.Movenext
Loop
------
<input type=HIDDEN name=txtCount value="<%=iCount%>">
<p><input type=SUBMIT value=submit></p>
------
the problem is i don't know how to write the validation in javascript..
function CheckPack(form) {
{
for i=1; i<=document.form.txtCount.value; i++) {
??????????
}}
please help..
thanks a lot..
rgds,
parames.s