Results 1 to 2 of 2

Thread: Executing javascript inside a GXT "page"/component

  1. #1
    Sencha User
    Join Date
    Jun 2009
    Posts
    10
    Vote Rating
    0
      0  

    Default Executing javascript inside a GXT "page"/component

    Hi,

    How do I execute a javascript inside a "gxt page"?
    Specifically Im 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:

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

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

  2. #2
    Ext GWT Premium Member
    Join Date
    Jul 2009
    Posts
    80
    Vote Rating
    0
      0  

    Default

    You can create a Native Method:

    Code:
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •