It's the same when i load on a button click. I ll take a look at requireJS.
Thank you for your help ! On Aug 12, 11:47 am, cokol <[email protected]> wrote: > this indeed could be the case, never seen that such things refuse to > work - but we're ont done yet, please try to defer loading the script > upon button click - just to be sure browser loaded and initialized, so > create a button and load the script from that onClickHandler() > > if still would ont work, then I'd blame maps' script ;) btw. when > serioously think about loading js on demand I'd suggest to try out > RequireJS romhttp://requirejs.org/ > > reg, > > On 12 Aug., 11:38, Vincent COROLLEUR <[email protected]> wrote: > > > I just tried this and it doesn't work, same problem. > > > I had already tried a similar thing but the JSNI was implemented in > > GWT code, same problem anyway :) > > > I tried to put a javaScript file with basic code on tomcat and it > > succed. So the problem doesn't come from the way i load the script. > > > I think the problem comes from the maps' javascript combined with > > dynamic load from GWT. From the javaScript i try to load, there is > > other call to scripts, maybe it's a problem... I think there's a > > mechanism that i'm not aware. > > > On Aug 12, 11:18 am, cokol <[email protected]> wrote: > > > > maybe you make a change to a DOM node what GWT is aware of and > > > therefore triggers module unload? > > > try following function (ready to use) define the function inside JSP > > > > <script> > > > function loadJS(url){ > > > var loaderNode = document.createElement("script"); > > > loaderNode.setAttribute("id","____ffxep"); > > > loaderNode.setAttribute("type","text/javascript"); > > > > > > (document.getElementsByTagName("head")[0]).appendChild(loaderNode); > > > loaderNode.setAttribute("src",url);} > > > > </script> > > > > and put invoker to your GWT class: > > > > public native void loadJS(String url)/*-{ > > > $wnd.loadJS(url); > > > > }-*/; > > > > ensure you have the HEAD tag in your html, and give it a try > > > > it has to work... > > > > On 12 Aug., 11:01, Vincent COROLLEUR <[email protected]> wrote: > > > > > But even if try to load only one map dynamically, it bugs. > > > > > It works only by the static way for the moment (script tag in > > > > index.jsp) -- 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.
