[thelist] Popup and opener interaction

kasimir-k kasimir.k.lists at gmail.com
Fri Feb 2 10:55:10 CST 2007


> I already tried sending a regular signal to opener from the popup, but 
> since the opener is the customer's website, and the popup is running on 
> our server, some browsers don't allow that, because it's cross-domain.

I had a bit similar situation and ended up not calling the pop-up from 
our server, but using document.write in the script the clients include 
on their pages. This way the pop-up can communicate to the opener.

In the included script I have a function to receive the pop-up's window 
object, and the pop-up calls that with an interval. If the user browses 
to another site and then returns to a page with the receiving function, 
the connection is restablished. And to avoid javascript errors while the 
user is on another site, I've wrapped the calls from pop-up in a try {} 
catch {} block.

.k



More information about the thelist mailing list