Hi Ivan! > What about the case if we have a > different origin - the main page (with JavaScript) is from > "http://my.site.org" and the page in IFrame is from > "http://another.site.com". Navigating in the IFrame page changes the > IFrame location. Is it possible to detect this change and get the > current location in the IFrame from the JavaScript in "main" page?
Is the other domain also under your control? I doubt it, but if yes, there are solutions to share data between pages from different domains even with the same-origin-policy in place: From within the content pages of one domain, you could set window.name to hold the (string) data you like to share. You can then access window.name from the page of the other domain (e.g. using a timer to poll for a change of this property). Size is limited, but in current browsers it could maybe hold up to 2MB(!?), see http://www.thomasfrank.se/sessionvars.html . Besides sharing data as described above the same-origin-policy should successfully prohibit accessing anything in the other domain's page (e.g. calling a JS function). Of course, you could also implement a proxy to circumvent SOP: all requests would go to a servlet under your domain (receiving the external domain as a query parameter), which then does the actual HTTP request and routes through the external response. Please note, your server has to handle additional HTTP traffic, and you should ensure nobody can use your proxy to surf arbitrary domains without authentification. Last but not least a rarely know JS feature: if the pages are on two different sub (!) domains, say sub1.site.com and sub2.site.com, you could set document.domain = "site.com" in both pages to also disable SOP for that specific setup. Hope this helps, Andreas ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
