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


Groups > comp.lang.javascript > #12781

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

From "J.R." <groups_jr-1@yahoo.com.br>
Newsgroups comp.lang.javascript
Subject Re: Best way to execute a function after a page is fully loaded?
Date 2012-03-15 22:31 -0300
Organization Aioe.org NNTP Server
Message-ID <jju55r$t94$1@speranza.aioe.org> (permalink)
References <5556880.249.1331821086035.JavaMail.geo-discussion-forums@vbnd9> <bu04m7h697acgketue09hu0g9sov5mre9c@4ax.com> <21099297.3019.1331829898163.JavaMail.geo-discussion-forums@vbtv42>

Show all headers | View raw


On 15/03/2012 13:44, Guerino1 wrote:
> Hi,
>
> I used the "<body onload="foo();">" recommendation and it worked fine.  I'm using it to execute a D3 related function to draw charts.
>
> Thanks,
>
> FG
>
>
> On Thursday, March 15, 2012 11:06:13 AM UTC-4, Hans-Georg Michna wrote:
>> <body onload="foo();">

I think that the "onload" attribute of the body element <body 
onload="..."> is the best option to choose from; it is DOM-0 compliant 
and is more reliable than window.onload.

See 
<https://groups.google.com/forum/?fromgroups#!searchin/comp.lang.javascript/body$20onload$20$2Blahn/comp.lang.javascript/YSdI97GV2n0/CA-63Hvp3-4J>

-- 
Joao Rodrigues (J.R.)

Back to comp.lang.javascript | Previous | Next — Previous 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