T
Tracey
I have found that the <asp:checkbox> control is not
respecting the disabled attribute while the <asp:textbox>
and other controls are respecting it. Does anybody know if
this is a known bug and if so, what it's number is? Can
anybody else reproduce this problem? I've included some
simple code below. Here is the Form:
<form id="frmTest" method="post" runat="server">
<asp:CheckBox ID="chkTest" Runat="server" Enabled="False"
Text="chkTest"></asp:CheckBox>
<asp:TextBox ID="txtTest" Runat="server"
Enabled="False">txtTest</asp:TextBox>
<asp:CheckBox ID="chkTryIt" Runat="server" Enabled="True"
Text="chkTryIt"></asp:CheckBox>
</form>
And here is some client side script used to flip flop
between enabled and disabled. Notice how the textbox
respects the disabled attribute, but for some reason the
checkbox doesn't?
Sub chkTryIt_OnClick
document.getElementById("chkTest").disabled = _
(document.getElementById("chkTryIt").checked = False)
document.getElementById("chkTest").checked = _
(document.getElementById("chkTryIt").checked = True)
document.getElementById("txtTest").disabled = _
(document.getElementById("chkTryIt").checked = False)
End Sub
respecting the disabled attribute while the <asp:textbox>
and other controls are respecting it. Does anybody know if
this is a known bug and if so, what it's number is? Can
anybody else reproduce this problem? I've included some
simple code below. Here is the Form:
<form id="frmTest" method="post" runat="server">
<asp:CheckBox ID="chkTest" Runat="server" Enabled="False"
Text="chkTest"></asp:CheckBox>
<asp:TextBox ID="txtTest" Runat="server"
Enabled="False">txtTest</asp:TextBox>
<asp:CheckBox ID="chkTryIt" Runat="server" Enabled="True"
Text="chkTryIt"></asp:CheckBox>
</form>
And here is some client side script used to flip flop
between enabled and disabled. Notice how the textbox
respects the disabled attribute, but for some reason the
checkbox doesn't?
Sub chkTryIt_OnClick
document.getElementById("chkTest").disabled = _
(document.getElementById("chkTryIt").checked = False)
document.getElementById("chkTest").checked = _
(document.getElementById("chkTryIt").checked = True)
document.getElementById("txtTest").disabled = _
(document.getElementById("chkTryIt").checked = False)
End Sub