How do I validate dynamic checkbox whether it is selected? How I get the name of the dynamic checkbox name?
Thank you.
<script language=javascript>
//----------
// require that at least one checkbox be checked
var selected = false;
for (i = 0; i < theForm.frmNo.length; i++)
{
if (theForm.form.checked)
selected = true;
}
if (!selected)
{
alert("Please choose a field.");
return (false);
}
}
//-->
</script>
While Not RS.EOF
<form name--------- >
<Input type=”checkbox” name=form<%=frmNo%> value="<%=RS("ID")%>"”>
RS.Movenext
Wend
Thank you.
<script language=javascript>
//----------
// require that at least one checkbox be checked
var selected = false;
for (i = 0; i < theForm.frmNo.length; i++)
{
if (theForm.form.checked)
selected = true;
}
if (!selected)
{
alert("Please choose a field.");
return (false);
}
}
//-->
</script>
While Not RS.EOF
<form name--------- >
<Input type=”checkbox” name=form<%=frmNo%> value="<%=RS("ID")%>"”>
RS.Movenext
Wend