Re: JSNI method doesn't work in IE?
Well, if you use a flextable, you can add a clickhandler to the flextable, and in the handler do something like
@Override
public void onClick(ClickEvent event)
{
FlexTable source = (FlexTable)event.getSource(); // if you can't get to the original flextable
Cell cellForEvent = source.getCellForEvent(event);
int rowIndex = cellForEvent.getRowIndex();
}
Ian
http://examples.roughian.com
2009/10/25 Tomer <tomerb@gmail.com>
Ian, thanks for your reply.
I'm trying to dynamically create a table and attach a mouseover
handler to the table rows, instead of attaching it to the individual
widgets. Any idea how I can do this with GWT, given the current
situation with IE?
Tomer
> 2009/10/24 Tomer <tom...@gmail.com>
On Oct 24, 2:54 pm, Ian Bambury <ianbamb...@gmail.com> wrote:
> Doesn't work in IE8 (or IE8 in IE7 mode)
>
> But i div in the html
>
> <div onClick="run()">xxxx</div>
>
> will run it OK.
>
> IE has never run scripts you add dynamically AFAIR and looks like it isn't
> hooking up a handler here.
>
> Ian
>
> http://examples.roughian.com
>
>
>
>
>
>
> > Now also tested with GWT 2 M2. Not working in IE6, Don't know about
> > the other IEs.
>
> > On Oct 24, 10:42 am, Tomer <tom...@gmail.com> wrote:
> > > Yes, this is exactly what I expected.
> > > I'm using GWT 1.7.1
>
> > > Following your response, I went over to WinXP (SP3), installed a fresh
> > > copy of eclipse and of the Google plugin, created a new GWT project
> > > and replaced the entire contents of the entry module class with the
> > > code listed above. Still doesn't work - when I click the label,
> > > nothing happens - not in hosted mode and not in web mode. (and still
> > > works in the other browsers)
>
> > > Regards,
> > > Tomer
>
> > > On Oct 24, 3:23 am, dougx <douglas.lin...@gmail.com> wrote:
>
> > > > O_o can you be more specific? This works fine for me in ie6 / ie7 /
> > > > ie8 / ie8 compatability mode...
>
> > > > Well... which is to say, I got a popup saying "Hello".
> > > > What were you expecting to happen?
>
> > > > public class Testing implements EntryPoint {
> > > > static {
> > > > exportJSNI();
> > > > }
> > > > public void onModuleLoad() {
> > > > runJSNI();
> > > > }
> > > > private static native void runJSNI() /*-{
> > > > $wnd.run();
> > > > }-*/;
> > > > private static native void exportJSNI() /*-{
> > > > $wnd.run = function() {
> > > > alert("hello");
> > > > };
> > > > }-*/;
>
> > > > }
>
> > > > ~
> > > > D.
>
> > > > On Oct 23, 11:38 pm, Tomer <tom...@gmail.com> wrote:
>
> > > > > Hi,
> > > > > I've got the following piece of code. Works perfectly in every
> > browser
> > > > > other than IE.
> > > > > What's going on?
>
> > > > > package test.client;
>
> > > > > import com.google.gwt.core.client.EntryPoint;
> > > > > import com.google.gwt.user.client.ui.Label;
> > > > > import com.google.gwt.user.client.ui.RootPanel;
>
> > > > > public class Iejsni implements EntryPoint {
>
> > > > > static {
> > > > > exportJSNI();
> > > > > }
>
> > > > > public void onModuleLoad() {
> > > > > final Label label = new Label("click me");
> > > > > label.getElement().setAttribute("onclick", "run()");
> > > > > RootPanel.get().add(label);
> > > > > }
>
> > > > > private static native void exportJSNI() /*-{
> > > > > $wnd.run = function() {
> > > > > alert("hello");
> > > > > };
> > > > > }-*/;
>
> > > > > }
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home