Something like this: package com.whatever.client;
public class Main implements EntryPoint { public void onModuleLoad() { createJsFunction(); } private static native void createJsFunction() /*-{ $wnd.jsToGWT = function(parm) { @com. whatever.client.Main::gwtMethod(Ljava/lang/String;)(parm); }; }-*/; @SuppressWarnings("unused") private static void gwtMethod(String parm) { RootPanel.get().add(new Label(parm)); } } and then you can test with this <a href=# onclick="javascript:jsToGWT('Hi!'">Click</a> in the html Ian http://examples.roughian.com 2009/3/20 markmac <mark.macum...@gmail.com> > > Hi Ian, > > That sounds like a good idea, dont know why i didnt think of that... > nice one! > > Im assuming you mean that I need to define a JSNI method in my GWT > code, that my own custom client code calls to invoke the insertion of > the widget on to the page? > > thanks for the thoughts! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---