Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7491077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:52:10+00:00 2026-05-29T15:52:10+00:00

Here is caller button samples in html: <input type=’button’ value=’Call’ onclick=’Test()’> And here are

  • 0

Here is caller button samples in html:

<input type='button' value='Call' onclick='Test()'>

And here are some functions I tried and which were not worked:

<script type="text/javascript">
    function Test() {
        com.tests.client.Test_GoogleWeb_JSNI::Callee()();
    }
</script>

But we are not able to call Callee().How we can achieve this?I mean how we can invoke JSNI function from javascript?

Help would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T15:52:12+00:00Added an answer on May 29, 2026 at 3:52 pm

    It’s very easy. You need to “export” your function written in GWT (or it can be another JSNI) function.

    Here is the relevant documentation: http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsJSNI.html#calling

    So in your case:

    In your GWT code:

    public static void Caller() /*-{ 
       ... 
    }-*/
    
    public static native void exportStaticMethod() /*-{
       $wnd.Callee =
          $entry(@com.tests.client.Test_GoogleWeb_JSNI::Callee());
    }-*/;
    

    Then you call exportStaticMethod() somewhere, even in your onModuleLoad. << YOU MUST DO THIS

    Then you can call Callee() from your handwritten javascript code.

    Your code for the button:

    <input type='button' value='Call' onclick='$wnd.Callee();'>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<input type='button' id='btn' value='click' /> <script type=text/javascript> var jObject = { bind : function(){
Still a newbie here, forgive me. I'm trying to make a button that will
Here's the scenario I have a page lets say login.aspx having a button called
I am creating some action script to simulate 3 button states and load in
I have a form where i've replaced the submit button with an input (with
Here is the situation: I have been called upon to work with InstallAnywhere 8,
Here is the scenario: I have an object called a Transaction that needs to
Here is my code stub for my app-delegate.m -- it never gets called. -
Here's the situation I have a webpage which has one drop down called prefer.
Which gets called first - the base constructor or other stuff here? public class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.