var windowUrl = \"\";
var windowName = \"mywin\";
var w = window.open(windowUrl, windowName, windowSize);
w.document.write(html);
w.document.close();
T
Try the following:
<script type="text/javascript">
function loadUniquePage(page)
{
if (opener && !opener.closed) {
opener.focus();
} else {
var myWin = window.open(page,'','width=800,height=600');
opener = myWin;
}
}
</script>
also take a look at this question - JavaScript window.open only if the window does not already exist
also take a look on the link provided by @Aram Kocharyan:
https://developer.mozilla.org/en/DOM/window.closed