Hi,
I have a asp page.in that i hv created some checkboxes as:
<%for i=1 to c %>
<tr>
<td width="27%" align="right" class="TabBodyR alignBrdLess"></td>
<td class="TabBodyB rdrLess"><input type="text" name="namerecd< %=i%>" size="30%"></td>
<td class="TabBodyB rdrLess"><input type="text" name="locrecd<% =i%>" size="33%"></td>
<td class="TabBodyB rdrLess"><input type="checkbox" name="chk<%=i%> " /></td>
</tr>
<% next %>
i have the number of check boxes in hidden text box
now i want to check these checkboxes using javascript function:
but i donot know how to refer each check box
function shiftnames()
{
count=document. form1.hidetxt1. value;
alert(count);
for (i=1;i<=count;i ++)
{
if (document.form1 .chk+i+.checked ==true)
{
// some lines
}
}
}
but the above if statement is not working
Please help me
it is very urgent
Thanks
I have a asp page.in that i hv created some checkboxes as:
<%for i=1 to c %>
<tr>
<td width="27%" align="right" class="TabBodyR alignBrdLess"></td>
<td class="TabBodyB rdrLess"><input type="text" name="namerecd< %=i%>" size="30%"></td>
<td class="TabBodyB rdrLess"><input type="text" name="locrecd<% =i%>" size="33%"></td>
<td class="TabBodyB rdrLess"><input type="checkbox" name="chk<%=i%> " /></td>
</tr>
<% next %>
i have the number of check boxes in hidden text box
now i want to check these checkboxes using javascript function:
but i donot know how to refer each check box
function shiftnames()
{
count=document. form1.hidetxt1. value;
alert(count);
for (i=1;i<=count;i ++)
{
if (document.form1 .chk+i+.checked ==true)
{
// some lines
}
}
}
but the above if statement is not working
Please help me
it is very urgent
Thanks
Comment