On Nov 30, 3:51 pm, animesh <[email protected]> wrote:
> I Have a GWt project which contains an IFrame hosted on
> myapp.domain.com.
> The IFrame loads a html file from differrent domain
> provide.domain.com.
>
> Once the html in the IFrame gets loaded it calls
> parent.myAppNotifyFunction();
>
> myAppNotifyFunction() resides with my GWT project. Basically the
> Iframe html after loading the page (onLoad event of body) calls
> myAppNotifyFunction() to tell that the page has loaded.
>
> I included the linker <add-linker name="xs" /> in my gwt.xml file.
>
> But still the Iframe is not able to call parent.myAppNotifyFunction();
>
> Any help would be great!!
> Also if some one has come across such example that would be nice.
>
> Is there anything else that i need to add for the xs linker.

The 'xs' linker is only useful when your HTML host page is at http://foo
and you compiled JS is at http://bar/myapp/myapp.nocache.js.

In your case, because the two pages' domains look like they share a
common denominator (domain.com), you can, in both pages, set
document.domain="domain.com" (because you'll set
$doc.domain='domain.com' in your GWT app, you might need the 'xs'
linker, otherwise, the hidden iframe within which your *.cache.html
will be loaded will still have document.domain=='myapp.domain.com',
thus might not be able to communicate with your HTML host page where
you set document.domain='domain.com').

If it happens that you just mis-chose your example domain names and
they actually do *not* share a common denominator, then you'll have to
go hackish and use all kind of tricks to allow such inter-frame cross-
domain communications, such as
http://ajaxian.com/archives/cross-domain-iframe-communication-without-location-polling
)

--

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