Hi,
I have an application in which clicking on a checkbox should make rest of the checkboxes checked. its rather simple. I have never used Javascript before so i have no clue how to get through this.
here's my code.
this is the checkbox which on checked should make other check boxes checked.
this is the code for other checkboxes(its in a loop)
and here's my javascript(i'm not sure how perfect this is)
but this is doing nothing.please help.
Ayush
I have an application in which clicking on a checkbox should make rest of the checkboxes checked. its rather simple. I have never used Javascript before so i have no clue how to get through this.
here's my code.
this is the checkbox which on checked should make other check boxes checked.
Code:
<td >
input <%If (Session("stateid") <> "") Then Response.Write("checked=""checked""") : Response.Write("")%> name="stateid" type="checkbox" class="body" id="stateid" onclick="javascript:checkall(stateID);" value="checkbox" />
All States.
</td>
Code:
<td
<input <%For x = 0 to Ubound(Session("preferenceID"),1)%><%If (cInt(Session("preferenceID")(x)) = cInt((StateDDL.Fields.Item("stateID").Value))) Then Response.Write("checked=""checked""") : Response.Write("")%><%Next%> name="stateID" type="checkbox" id="stateID" value="<%=(StateDDL.Fields.Item("stateID").Value)%>" />
<%=(StateDDL.Fields.Item("stateName").Value)%> </td>
and here's my javascript(i'm not sure how perfect this is)
Code:
<script type="text/JavaScript">
function checkall(stateID)
{
stateID.Checked=true;
}
</script>
Ayush
Comment