My problem-

I have a web page which is calling a popup using window.open, which is then opening another popup also using window.open. I have a link on the second popup which is opening a new link back in the original webpage. This is working fine, but I'm having trouble checking the window.opener.opener.closed condition. If the original page has been closed, I want to pop up a new window to load the page instead. Below is the function I wrote-

function Redirect(url){
if (window.opener.opener.closed) {
window.open.location = url;
} else {
window.open = url;
}
self.close();
}

And the call-
<a href="javascript:Redirect('index.html');" onclick="Redirect('index.html');">

But if the parent is closed, nothing happens??