Seeking assistance in locating a hidden button in Javascript. I am currently working with ASP.NET 4.
I can easily find a "visible = True"
, but when attempting to locate a hidden element, the system displays an "object not found" error message.
<script type="text/javascript">
function ShowAge()
{
var elem = document.getElementById('MainContent_chbFilter');
if (elem != null)
alert("Located it!");
else
alert("Button not found");
var elemc = document.getElementById('MainContent_txtMSISDN');
if (elemc != null)
alert("Found the second one!");
else
alert("Element not found");
}
</script>
Currently utilizing asp:content
. Any assistance is greatly appreciated.