M
mannerfanner
In order to reload the opener window from a child window I want to
check the parent windows state. The following code works fine in IE
and Mozilla:
if(top.opener && !top.opener.closed)
{
top.opener.location.reload();
}
BUT ... The state check works because IE recognises top.opener.closed
and Mozilla recognises top.opener. BUT IE does not recognise
top.opener and Mozilla does not recognise top.opener.closed.
I have seen this solution used on several sites. It can't be good
practise to fudge two statements together in one statement to make
them work for two different browsers.
Does anyone know of single method for checking window state which
works in IE and Mozilla?
check the parent windows state. The following code works fine in IE
and Mozilla:
if(top.opener && !top.opener.closed)
{
top.opener.location.reload();
}
BUT ... The state check works because IE recognises top.opener.closed
and Mozilla recognises top.opener. BUT IE does not recognise
top.opener and Mozilla does not recognise top.opener.closed.
I have seen this solution used on several sites. It can't be good
practise to fudge two statements together in one statement to make
them work for two different browsers.
Does anyone know of single method for checking window state which
works in IE and Mozilla?