Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #12758

Best way to execute a function after a page is fully loaded?

From Guerino1 <fguerino0@gmail.com>
Newsgroups comp.lang.javascript
Subject Best way to execute a function after a page is fully loaded?
Date 2012-03-15 07:18 -0700
Organization http://groups.google.com
Message-ID <5556880.249.1331821086035.JavaMail.geo-discussion-forums@vbnd9> (permalink)

Show all headers | View raw


Hi,

I'd like to automatically execute a function after all the HTML body elements have been loaded?  I know there are a number of way to invoke functions (based on events and so on).  I'm looking for opinions on what the group things are the best ways to do so.

For example...

<body>
  <div id="div_1"></div>
  <div id="div_2"></div>
  <script>
    // <----- Would like to "always" execute function "foo()" at this point.
  </script>
<body>

Does anyone have any suggestions?

Thanks,

Frank

Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Best way to execute a function after a page is fully loaded? Guerino1 <fguerino0@gmail.com> - 2012-03-15 07:18 -0700
  Re: Best way to execute a function after a page is fully loaded? Hans-Georg Michna <hans-georgNoEmailPlease@michna.com> - 2012-03-15 16:06 +0100
    Re: Best way to execute a function after a page is fully loaded? Guerino1 <fguerino0@gmail.com> - 2012-03-15 09:44 -0700
      Re: Best way to execute a function after a page is fully loaded? "J.R." <groups_jr-1@yahoo.com.br> - 2012-03-15 22:31 -0300

csiph-web