Have a look at how google loads some of the JS libraries. I'm guessing
that you want something similar...

http://code.google.com/p/gwt-google-apis/wiki/VisualizationGettingStarted

Cheers,

On Sep 17, 6:32 pm, bgoetzmann <[email protected]> wrote:
> Hello,
>
> I'm developing a GWT 1.6 application with SmartGWT; the application
> works well! The web page's body I use has of course the code bellow to
> load the application:
>
> <script language="javascript" src="/...Main.nocache.js"></script>
>
> I search a way to dynamically load the application but without
> success; for example, on a link with code like this, in order to add a
> script tag to the page's document:
>
> <a href="javascript:f()">test</a>
>
> Having f defined like this:
> function f() {
>             var script = document.createElement('script');
>             script.setAttribute('type', 'text/javascript');
>             script.setAttribute('src', '/...Main.nocache.js');
>             document.getElementsByTagName('body')[0].appendChild
> (script);
>
> }
>
> But it soesn't work;the behavior is even strange because the entire
> page content is replaced by the tag html containg a sery of script
> tags.
>
> How can I achieve a dynamic load?
>
> Thank you a lot.
>
> Bertrand.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to