I have a javascript application that lives on say domainA.com. In order to authenticate a user and set cookies, it opens a popup window on domainB.com. (this is similar to Twitter's @anywhere).
How do detect when the popup on domainB.com closes and call a function in the javascript that opened it on domainA.com?
I've tried various methods like window.opener, window.unload, etc, but run into cross domain limitations.
window.postMessage将在支持它的浏览器上为您提供帮助... https://developer.mozilla.org/en/DOM/window.postMessage
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.