Hello,
Using the following script, in Netscape, the new window does not stay in focus, because the opener window takes too long to do it's history.back, so it brings the opener window back into focus and leaves the new window in back. In IE it works fine.
I tried using setInterval and setTimeout with no success, perhaps I had incorrect syntax.
Can anyone help with this? Want to have the new window display and stay in focus above opener window.
Thanks.
<script language="javascript">
<!--
var winURL = "files/" + '<%=sFileName%>';
var winName = "newWind" + Math.round(Math.random() * 9999999);
var winProp = "height=500,width=725,top=20,left=20,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,location=no,directories=no,status=no,copyhistory=no";
var newWin = window.open(winURL, winName, winProp);
newWin.opener.history.back();
newWin.focus();
//NN too slow on history.back and new window gets hidden
//-->
</script>
Using the following script, in Netscape, the new window does not stay in focus, because the opener window takes too long to do it's history.back, so it brings the opener window back into focus and leaves the new window in back. In IE it works fine.
I tried using setInterval and setTimeout with no success, perhaps I had incorrect syntax.
Can anyone help with this? Want to have the new window display and stay in focus above opener window.
Thanks.
<script language="javascript">
<!--
var winURL = "files/" + '<%=sFileName%>';
var winName = "newWind" + Math.round(Math.random() * 9999999);
var winProp = "height=500,width=725,top=20,left=20,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,location=no,directories=no,status=no,copyhistory=no";
var newWin = window.open(winURL, winName, winProp);
newWin.opener.history.back();
newWin.focus();
//NN too slow on history.back and new window gets hidden
//-->
</script>