Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you make a window always stay at the front?

Status
Not open for further replies.

meeble

Programmer
Sep 24, 2002
137
GB
Hello,

On my site you have a couple of windows open at the same time. How do you always make one window stay at the front so you can always see it?

Regards,

James
 
you need to use the self.focus() function on the onBlur event

This has to be called on the popup


first make a simple window.open call.

<html>
<HEAD>

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>

<!-- Begin
function topWindow(){
popup = window.open(&quot;mypage.html&quot;,&quot;&quot;,&quot;height=200,width=300,scrollbars=no&quot;);
}
// End -->
</SCRIPT>

<BODY>

<CENTER>
<FORM>
<INPUT TYPE=&quot;BUTTON&quot; VALUE=&quot;Pop-Up&quot; onClick=&quot;topWindow()&quot;>
</FORM>

</body>
</html>

Then create mypage.html

<html>
<BODY onBlur=&quot;self.focus()&quot;>
</html>

 
But the popup wont stay at the top if you dont click it?? How to activate it automaticly?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top