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!

Bring-to-front

Status
Not open for further replies.

sleuth

Programmer
Jan 12, 2001
134
US

Hello,

Say you have your browser window open, then you click to focus another window in your bar down there on the bottom you your screen, is there a javascript that will make the browser window focus to the front? Becuse self.focus(); doesn't work unless your try to minimize the window.

Thanks,

Tony
 
hiee!
what do u mean: it doesnt work what event do u use 2 execute self.focus()?
 
Hi!

This is a very annoying thing for the user if they really want to leave your window - but this script below works for me. Just don't try to get it running from both Netscape and IE windows like I just did as you get focus flipping from one to the other...flicker flicker...scream!

<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>

<BODY onblur=&quot;self.focus();&quot;>
This is very annoying
</BODY>
</HTML>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top