javascript - Popup window always on top - Stack Overflow

Am looking at whatever hacks that are possible to keep a window always on top (apart from window.focus(

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 plete cross-browser solution. I think window.focus would work for Internet Explorer, though I am yet to test it.

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 plete cross-browser solution. I think window.focus would work for Internet Explorer, though I am yet to test it.

Share Improve this question asked Aug 30, 2010 at 17:37 Alec SmartAlec Smart 96k39 gold badges124 silver badges186 bronze badges 2
  • 1 Please don't do this, however legitimate your purpose if it's not optional it's unwele (albeit this is my own opinion, and causes me to leave sites even more rapidly than blinking banner ads). – David Thomas Commented Aug 30, 2010 at 17:48
  • See newer answers here: stackoverflow./questions/14565310/… – Erel Segal-Halevi Commented Jan 30, 2013 at 8:13
Add a ment  | 

1 Answer 1

Reset to default 3

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();"> 

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744077098a4554603.html

相关推荐

  • javascript - Popup window always on top - Stack Overflow

    Am looking at whatever hacks that are possible to keep a window always on top (apart from window.focus(

    9天前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信