Jump to content
xisto Community
Sign in to follow this  
mahender

How Do I Create A Window That Is Always On Top How do i create always on top pop window

Recommended Posts

I'll assume you are asking that as a question ('How do I...' would be more indicative of such than 'How to...').

 

Anyway, the simple answer is you can't. You cannot explicitly force a browser window to remain above other windows at all times. You can, however, exploit a little JavaScript to keep your window focused - but it would not work with all browsers, and may cause problems.

 

One option would be to focus the window on a timer basis, so that it focuses itself every x [milli]seconds. Another would be to instruct the window to focus itself on the body onblur() event. As I said, these would only work in some browsers (I would assume they would both be effective in Internet Explorer - assuming the worst for that browser is usually accurate), and could be prevented in any web browser by disablign JavaScript or selectively disabling certain JavaScript functions or events.

Share this post


Link to post
Share on other sites

this bit of code has always worked for me. It would be easier if you could say what version on browsers you want it to work with.<a href="file name" onclick="var popupwindow=window.open(this.href, 'popup', 'width=400,height=300,scrollbars,resizable'); popupwindow.focus(); return false;">Sample popup</a>If it doesn't work, then i would just look into the focus() parameters that do apply to the browser you want it to work with.Hope this helps.round

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.