There are many examples of it in this group.
Below an example:
The javascript function:
public static native Element getHead() /*-{
return $doc.getElementsByTagName('head')[0];
}-*/;
You simple call this in your click handler.
-- Ed
--~--~-~--~~~---~--~~
How can we call a java script function GWT components event,such as
click
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To post to this group, send email to
Hi,
You can use a native method call to execute a javascript function.
public native void callFunction() /*-{
if (typeof myFunction== 'function') {
myFunction();
}
}-*/;
Now inside your onClick() method call this method.
public void onClick(Widget sender) {
How can we call a java script function on GWT click event,I mean
clicking on a button how can we execute a java script code.Is there
any example.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google Web Toolkit