I have a problem related to iFrame and JSNI problem. Basically the
scenario is like this:

I have an application written in GWT and in this application I have an
iFrame and the page inside iFrame is in the same domain as my GWT
application. When the iFrame content finishes loading, I need to
append a Panel (which is written in GWT) into the iFrame page. So I
write some JSNI codes to basically listen to iFrame onload event, once
this event is triggered, pass the Panel from Java to JavaScript and
append it to the iFrame.  The JSNI method to pass the Panel object
into JavaScript and append it is like this:

public static native void appendContent(Element panel) /*-{
       $ = $wnd.$; // convenient method to call jQuery library

       $('#iframID').contents().find('body').append(panel);
}-*/;

In Firefox, this code works fine. In IE7/8, the Panel written in GWT
can be appended into iFrame page, but all event handlers in the Panel
do not work. In WebKit-based browsers such as Chrome and Safari, the
Panel can not even be appended into iFrame page. I know the problem of
Chrome and Safari is probably because different browsers have
different ways to handle iFrame. But why all event handlers do not
work in IE? And is there a way to make it work in all browsers?

Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to