I have login page that displays a link to a pdf file, a checkbox and label that is disabled. When user clicks on link a 2nd window pops up with a pdf file and the checkbox and label needs to be enabled.
When the page initially loads the link, checkbox, and label is not visible. Employee logs in and there's a lookup to a table that contains all PDFs that need to be viewed. If there are any PDFs, the link of the pdf name, checkbox, and label become visible, but the checkbox and label are disabled.
My problem is that using the code below, the label becomes enabled, but the checkbox stays disabled.
What am I doing wrong? Does the checkbox and label not work the same way? Any help would be greatly appreciated.
Thanks,
Ninel
This is my code:
Code:
HTML:
<script language="javascript">
function toggleInputElementsDisabledStatus()
{
var elem = document.getElementById("chkRead");
if (elem != null)
{
elem.disabled = !elem.disabled;
}
var elem = document.getElementById("lblRead");
if (elem != null)
{
elem.disabled = !elem.disabled;
}
}
</script>
<asp:label id="lblRead" runat="server" Font-Names="Tahoma" Font-Size="x-Small" Width="280px" enabled="False">I have read the new/updated policies</asp:label>
<asp:checkbox id="Read" runat="server" Font-Names="Tahoma" Font-Size="x-Small" enabled="False" ></asp:checkbox>