Thursday, October 27, 2011

Re: Trouble accessing Javascript function in JSNI

Try $wnd.tabberAutomatic(tabberOptions);  and  $wnd.sortables_init();

2011/10/27 laredotornado <laredotornado@zipmail.com>
Hi,

I'm using GWT 2.4.  I've included this on my main module page ...

       <script type="text/javascript" src="js/tabber.js"></script>
       <script type="text/javascript" src="js/sortable.js"></script>
 </head>

The file "js/tabber.js" defines a function, "tabberAutomatic".
However, when this Java method is invoked from a client package ...

       public static native void postHtmlProcessing() /*-{
               var tabberOptions = {
                       manualStartup : true
               };

               // set up the tabs
               tabberAutomatic(tabberOptions);

               // set the tables
               sortables_init();
       }-*/;

I get an error, "com.google.gwt.core.client.JavaScriptException:
(ReferenceError): tabberAutomatic is not defined."  What am I doing
wrong?  I have verified through my browser that the external scripts
are being loaded, yet GWT is finding them.

Any help is appreciated, - Dave

--
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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--

GWT API for  non Java based platforms

--
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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment