Hi,

  You can't directly in GWT it honors cross site scripting you can however 
drop down to Javascript. Write a JSNI method that accesses the containing 
docs parent (your app) by accessing top, then in your code you can access 
the iFrame and then it's document. Something like this:

public static DocumentElement getFrameDocumtent() {
FrameElement top = getTopDocument().getElementById("MyiFrame");
return top.getContentDocument();
}

public static native Document getTopDocument() /*-{
return top.document;
}-*/;

I haven't tested this code but pulled pieces from some of my working code 
to give you an idea.

Hope that helps,

Gordon Pike
gwtcasts.com
easygwt.com

On Friday, September 21, 2012 2:28:25 AM UTC-6, Coco Gwt wrote:
>
> Hi,
>
> i have created an iFrame in my project that calls an external service (for 
> example whatismyip.com) that returns my public IP.
> the problem is i cant get iFrame content, because there is a completly 
> different domains.
> the question is how can i get this iFrame contents ? its very urgent 
> please !
>
> Thank you
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/9ai_kotJqZIJ.
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.

Reply via email to