morgancodes
morgancodes

Reputation: 25265

Can a popup call javascript functions on its opener if the two windows are on different subdomains?

I think the title of my question pretty much sums it all up. I'm wondering if I'll be able to send data from a popup back to its opener if the popup is in the same base domain as its opener, but a different subdomain. I'm aware that it's possible to send data by rewriting the hash part of the url, even across domains, but I'd rather not do that if I can avoid it.

Upvotes: 1

Views: 617

Answers (1)

David Houde
David Houde

Reputation: 4778

If you set document.domain = "toplevel.com"; on both DOM's you should be able to communicate.

Upvotes: 1

Related Questions