Ext


Go Back   Ext JS Forums > Ext GWT Community Forums (2.x) > Gxt: Help

Reply
 
Thread Tools
  #1  
Old 11-03-2009, 03:11 PM
rgalvao rgalvao is offline
Ext User
 
Join Date: Jun 2009
Posts: 8
rgalvao is on a distinguished road
Default Executing javascript inside a GXT "page"/component

Hi,

How do I execute a javascript inside a "gxt page"?
Specifically I´m trying to integrate with a plugin
that has this javascript bridge:

http://www.unifycommunity.com/wiki/i...le=UnityObject

As this page says, I included this code inside my html file:

Quote:
<script type="text/javascript" src="unityobject.js"></script>
And tried to integrate with the plugin puting the following code
inside a Html component´s content.

Quote:
<script type="text/javascript">
var uniObj = new UnityObject("example.unity3d", "example", "640", "480", "000000", "000000");
uniObj.write();
</script>
But nothing appears. Is there another way? Am I doing
it wrong?

TIA,
R.
Reply With Quote
  #2  
Old 11-03-2009, 04:47 PM
terciofilho terciofilho is offline
Ext GWT Premium Member
 
Join Date: Jul 2009
Posts: 17
terciofilho is on a distinguished road
Default

You can create a Native Method:

public native void executeJS() /*-{
     var uniObj = new UnityObject("example.unity3d", "example", "640", "480", "000000", "000000");
     uniObj.write();
}-*/;
And call this method in your GWT application.

Hope this helps.
Reply With Quote
Reply

Thread Tools

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -5. The time now is 04:13 PM.

© 2006-2009 Ext, LLC
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.