Call javascript after page load
Recently I required to call a function after a page load in my project.
onLoad event is available in html but not like afterLoad or offLoad event in html.
I found one of the easiest solution. Just call a function at end of the page. :)
<html> <body> ..... <script>function_name();</script> </body> </html>
Is that so simple?

















It works, and it’s really so simple. Thanks a lot!
I’ve tried to call this script within form tags with no effect. I tried some more sophisticated methods with no success, but things tuned out to be so simple. Good.
Thats brilliant I am using a child page and all the usual stuff didnt apply. I used ur code to pass the count of a grid to an external js function.The function checks the count and if < 1 hides a html button.
HideControls(”);
Great stuff thanks man
It solved my problem.Thanks a lot.