Reputation: 99
I am encouraging people to embed my website on their own using an iFrame. What I need to do is to let the Javascript on my page find out their domain. So if they embed my page on http://yahoo.com then I need to be able to fetch that address.
How to?
I tried various things such as parent.window.location, window.location etc. But all I get is the address to my page in the iFrame.
Upvotes: 1
Views: 562
Reputation: 2968
try this:
window.opener.document.location
or
window.parent.document.location
Upvotes: 1