Re: Calling java scrip function
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 --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Calling java scrip function
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 Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Calling java scrip function
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) { callFunction(); } Cheers, Kamal --- Kamal Mettananda http://lkamal.blogspot.com On Thu, Jun 4, 2009 at 9:31 AM, subbu subashkaruval...@gmail.com wrote: 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 Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Calling java scrip function
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 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---