You can also try using ScriptInjector, and make sure you set the Window to 
the one you want ($wnd).  They provide a callback to let you know when it 
is loaded:

http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/core/client/ScriptInjector.html

Here is one way I have used 
it: 
http://stackoverflow.com/questions/8744663/how-to-insert-twitter-widget-into-a-gwt-view/8764304#8764304

On Thursday, June 28, 2012 6:02:54 PM UTC-4, Bakul wrote:
>
> Hi,
>
> You can add javascript asynchronously whenever you want and invoke any 
> function from that js using JSNI.
>
> Please refer following 
>
> https://developers.google.com/web-toolkit/articles/using_gwt_for_json_mashups
>  
>
> You will probably need something like following to add js in the page and 
> then you can invoke the method from your js using JSNI
>
> public void addScript(String url) {
>     Element e = DOM.createElement("script");
>     DOM.setAttribute(e, "language", "JavaScript");
>     DOM.setAttribute(e, "src", url);
>     DOM.appendChild(RootPanel.get().getElement(), e);
> } 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/l8zhZo-wkgQJ.
To post to this group, send email to google-web-toolkit@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.

Reply via email to