Re: Asynchronous Loading of Compiled Script

2010-08-20 Thread eggsy84
Sorry didn't mean to post please see full message below:

Hi all,

Not posted for a while so hello again!

I have written a small piece of GWT code that people can to their
website and it performs a few JSONP requests and the like. It
functions in a similar way as that of the Google Analytics code in
terms of a small piece of code anyone can add to their website.

People include the code by simply placing it the script tags in the
Head of their website like so:

head
script type=text/javascript src=http://mydomain.com/
mygwtwidget.nocache.js /
/head

One of the problems this suffers from is that if for some reason
mydomain is down it prevents the browser from loading the rest of the
DOM until it has decided that it cannot access my gwt javascript.

Google and their analytics code combat this by performing an
Asynchronous call to fetch the Javascript and appending to the DOM.
(This is relatively new they didn't use to)

Can anyone explain to me how this works and how one could achieve the
same effect with a compiled GWT piece of Javascript?

Many thanks all in advance,

Eggsy

On Aug 20, 10:38 am, eggsy84 jimbob...@hotmail.com wrote:
 Hi all,

 Not posted for a while so hello again!

 I have written a small piece of GWT code that people can to their
 website and it performs a few JSONP requests and the like. It
 functions in a similar way as that of the Google Analytics code in
 terms of a small piece of code anyone can add to their website.

 People include the code by simply placing it the script tags in the
 Head of their website like so:

 head

 /head

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Asynchronous Loading of Compiled Script

2010-08-20 Thread eggsy84
To add a bit more on this there are various ways in which the client
can asynchronously load my external javascript

http://ntt.cc/2008/02/10/4-ways-to-dynamically-load-external-javascriptwith-source.html

However, my GWT Java/Javascript code *must* not be executed until the
DOM has fully loaded. I can tell users to put the script as the last
element before the closing 'body' tag however is there a way from GWT
to know when the DOM has been fully loaded?



On Aug 20, 10:43 am, eggsy84 jimbob...@hotmail.com wrote:
 Sorry didn't mean to post please see full message below:

 Hi all,

 Not posted for a while so hello again!

 I have written a small piece of GWT code that people can to their
 website and it performs a few JSONP requests and the like. It
 functions in a similar way as that of the Google Analytics code in
 terms of a small piece of code anyone can add to their website.

 People include the code by simply placing it the script tags in the
 Head of their website like so:

 head
     script type=text/javascript src=http://mydomain.com/
 mygwtwidget.nocache.js /
 /head

 One of the problems this suffers from is that if for some reason
 mydomain is down it prevents the browser from loading the rest of the
 DOM until it has decided that it cannot access my gwt javascript.

 Google and their analytics code combat this by performing an
 Asynchronous call to fetch the Javascript and appending to the DOM.
 (This is relatively new they didn't use to)

 Can anyone explain to me how this works and how one could achieve the
 same effect with a compiled GWT piece of Javascript?

 Many thanks all in advance,

 Eggsy

 On Aug 20, 10:38 am, eggsy84 jimbob...@hotmail.com wrote:

  Hi all,

  Not posted for a while so hello again!

  I have written a small piece of GWT code that people can to their
  website and it performs a few JSONP requests and the like. It
  functions in a similar way as that of the Google Analytics code in
  terms of a small piece of code anyone can add to their website.

  People include the code by simply placing it the script tags in the
  Head of their website like so:

  head

  /head

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.