I know there are a few answers to this question.
Usually the answers given online involve doing this...
document.getElementById (<%=myElementID.ClientID %>);
rather than this...
document.getElementById("myElementID");
However, even when I do it the first way, my JavaScript code still cannot find the element. It tells me the element is undefined.
So...just for testing...I tried to strip out all my JavaScript code and access the element with an alert box like this...
<script type="text/javascript">
alert(document.getElementById('<%=searchHyperLink.ClientID %>').value);
</script>
It still tells me its undefined.
But its not freaking undefined! When I view the page source, the id rendered by <%=searchHyperLink.ClientID %> exactly matches the id of the control I want to find.
Any suggestions?