Reputation: 1
I'm calling a javascript for my Gridview, but it seems like document.all does not work in Chrome/Firefox.
What can I replace this with? Thank you
<script type="text/javascript">
GridViewHelper.Init(document.all.GridView1, 100, 0);
</script>
Upvotes: 0
Views: 5378
Reputation: 944202
document.getElementById
is the usual choice (the element needs an id).
There are plenty of other options though, including the new, shiny and less well supported document.querySelector
.
Upvotes: 4