have a question about referencing an
<asp:HiddenField ID="editcheck" runat="server"/>
from a JS function. The function is being hit as a null reference error is thrown by the
var e = document.getElementById('<%=editcheck.ClientID%>');
line in the function.
Any Ideas?
Thanks
ps: Here is the actual line throwing the exception.
if(e.value == "true")
return confirm("yadayad");
The error states value can not be checked on a null object, or something close. So that is why I'm asking about the JS function seeing the element.
documentis null, which is unlikely. Is this the real code? What variable exactly is null?if(e.value == "true") return confirm("yadayad");It error states value can not be checked on a null object, or something close. So that is why I'm asking about the JS function seeing the element. Thanks.var e = document.getElementById('<%#editcheck.ClientID%>');