Call javascript after page load

By Brijesh Shah, July 24, 2009 8:00 pm

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?

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Webnews
  • Digg
  • del.icio.us
  • Reddit
  • Bloglines
  • LinkedIn
  • YahooMyWeb
  • Facebook
  • Google Bookmarks
  • Mixx
  • MySpace
  • Technorati
  • TwitThis

One Response to “Call javascript after page load”

  1. googenot says:

    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.

Leave a Reply

Security Code:

Panorama Theme by Themocracy