There is a <script>
in my code that includes the following line:
var tbl = document.getElementById("<%= this.tblSelection.ClientID %>");
Despite this, when the script runs, tbl
always ends up being set to null
.
The table has been defined like this:
<asp:Table ID="tblSelection" runat="server" CellPadding="2" CellSpacing="0"
cols="1" style="position: absolute; top: 0%; right: 0%">
Both the script and the table are located within the same master page file.
What could be the issue causing this problem?
EDIT: I forgot to mention that this script is executed on onload
.