Forum Moderators: open
However, I'm not clear on how to check if a particular document (such as index.html) is displayed anywhere. Javascript can't "look" at other windows without permission, either implicit -- because you opened the window with javascript and hence know how that object is named, or explicit -- as in a signed script.
Example:
<script type="text/javascript">
function myFunc() {
if(!window.opener.location.href="http://www.example.com/index.html") {
window.opener.location.href="http://www.example.com/index.html";
}
self.close();
}
</script>
<a href="javascript:myFunc()">Close window</a>