Link to home
Start Free TrialLog in
Avatar of tinson
tinson

asked on

Force new Open Window to stay on top ?

I have opened a new window using VBScript as follows:

    strOptions = "toolbar=No, location=No, directories=No, "
    strOptions = strOptions & "status=No, menubar=No, scrollbars=No, "
    strOptions = strOptions & "resizable=No, width=800, height=600,"
    strOptions = strOptions & "top=0, left=0"
    newWindow = Window.Open(otherURL, "myNewWindow", strOptions)

I have noticed when I click the other window underneath, the newWindow disappeared into the back and got covered by the other window.  Is there any way of forcing the newWindow to stay on top no matter what I click ??
Avatar of tinson
tinson

ASKER

Adjusted points from 100 to 200
Here is  JavaScript solution.  This goes into the head and body of the page you wish to stay on top.  The number 3000 is the number of milliseconds until the window is refocused; in this case 3 seconds.  You can set it for whatever you want.

<SCRIPT LANGUAGE="JavaScript">
<!-- Hide from older browsers
function setTimer(){
      setTimeout ("window.focus()",3000);}
// end hiding -->
</SCRIPT>

</HEAD>
<BODY onBlur="setTimer()" BGCOLOR="#ffff80">
ASKER CERTIFIED SOLUTION
Avatar of nettrom
nettrom

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tinson

ASKER

Comment accepted as answer