views:

23

answers:

1

Am looking at whatever hacks that are possible to keep a window always on top (apart from window.focus()). Maybe a hidden textbox to which I can set focus etc.

I see this happening in LivePerson (support) whenever a new message arrives. I have legitimate use of this and not to annoy users with ads or anything.

Any hacks for any browsers will do. I am not looking at a complete cross-browser solution. I think window.focus would work for Internet Explorer, though I am yet to test it.

A: 

This JavaScript code will place the popup window on top of all other open browser windows until the viewer closes the window containing this little JavaScript code:

<body onblur="self.focus();"> 
Nick
My usual response to such code: Kill it! Kill it with Task Manager! (You are right, this will work for IE. That's one of the reasons I stay away from it whenever possible.)
Piskvor