|
I have a checkbox that I set as enabled="false".
I then kick off a javascript function that should enable it.
I have the following code:
[code]
<asp:checkbox id="chkRead" runat="server" Font-Names="Tahoma" Font-Size="x-Small" enabled="False" ></asp:checkbox>
function toggleInputElementsDisabledStatus()
{
if (document.all || document.getElementById)
{
alert(document.getElementById("chkRead").disabled); document.getElementById("chkRead").disabled=false;
alert(document.getElementById("chkRead").disabled);
}
}
[/code]
As you can see I have alert messages telling me what the disable value of the checkbox is.
The first alert shows me that disable is true. The second shows me that disable is false. So the checkbox should get enabled on the aspx page, but it doesn't. It stays disabled.
When I look at the view source of the aspx page I see <span> tags around the checkbox.
[code
<span disabled="disabled" style="font-family:Tahoma;font-size:X-Small;"><input id="chkRead" type="checkbox" name="chkRead" disabled="disabled" /></span>
[/code]
Could this span tag be the culprit? How do I get around this?
Any help would greatly be appreciated.
Thanks,
Ninel
|
|
|
|
|
|
|
|