Checkbox - in Javascript
Posted
by
smiley
on Stack Overflow
See other posts from Stack Overflow
or by smiley
Published on 2012-09-23T15:12:35Z
Indexed on
2012/09/23
15:37 UTC
Read the original article
Hit count: 164
I am working on Edit screen where I am pulling out value from db to check if the checkbox is checked or not.
If it is unchecked, it should deselect the checkbox and other controls of this checkbox. In my case the js works perfectly fine. That is if my previous screen has checkbox unchecked, edit screen disables all the values for this checkbox. But it still shows the checkbox is checked in UI(though it is actually checked). Something is wrong with my html code.
Can someone please let me know where /how should i modify to display if my checkbox is unchecked?
<%chkStatus=list.getCheckbox();
if (chkStatus == null) { chkStatus = ""; }
%>
<input id="chkbox" type="checkbox" name="chkbox" checked="<%=chkStatus%>"
onchange="javascript:enableDisableTextBox();">
© Stack Overflow or respective owner