Hi! I would like to load my GWT app on demand by appending a script
element to my html file. This is what I have done:

1. Create a simple module with Window.alert("Hello World!");
2. add <add-linker name="xs"> to the module's xml (I have also tried
sso, but that does not work either)
3. write a simple test.html page with the following script:
var loadGWT=function(){
var fileref=document.createElement('script');
fileref.setAttribute("type","text/javascript");
fileref.setAttribute("language","javascript");
fileref.setAttribute("src", "<module-name>.nocache.js");
  }
4. add a link that calls loadGWT()

The result in Firefox is rather strange: Clicking on the link causes
the link to disappear. The page tries to load something (maybe the
cache files) but the loading process never stops and nothing happens.
Yet, if I press the browsers stop button, I get my "Hello World!"
alert (only in Firefox, not in Chrome or IE). So the module is loaded
after all (is there a problem with the onDomContentLoaded method?).

If I create the script tag by hand everything works fine.
Is there any way to inject GWT apps on demand?



--~--~---------~--~----~------------~-------~--~----~
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