views:

10

answers:

1

I have an http window which opens a secure popup to submit a form to a third party web site. After the popup is closed, I would like to reload the opener so that it reflects the results of the form submission.

Since the opener and the popup use different protocols (http and https), I can't do it in the straightforward way (window.opener.location.reload()). Is there another way? Do I have to venture into JSONP?

A: 

Kludgy way: set timeout to check if opened popup was closed.

function checkClosed(){
    if(new_win.closed){
        alert('Window was closed');
    }
    else{
       window.setTimeout(checkClosed,1000);
    }
} 

new_win = window.open('about:blank');
window.setTimeout(checkClosed,1000);
dev-null-dweller