|
|
Q645 When using window.open for the second time on a already opened window, how can I bring the window in front of the main browser window?
irt.org | Knowledge Base | JavaScript | Window | Q645 [ previous next ] Q645 When using window.open for the second time on a already opened window, how can I bring the window in front of the main browser window?You can set a window as being the "active" window by giving it the focus:
You can wrap that up with the window creation using:
This is only possible in JavaScript 1.1, so you might want to code two different functions, one which does this and one which doesn't:
The following was submitted by Dave Watts As was said in a previous answer, you use <window>.focus( ) to bring the window to the front. Adding this time to a function to open the window can be a pain if you're using an inline window open (with onClick and the like). You can achieve the same result by adding the following to the <head> of the window you are opening:
Then, when the page is loaded (or loaded again) it brings itself forward. I did this for my vanity site's remote webcam window. This is the link used to open the window (pretty much standard):
This is the page that is opened:
Feedback on 'Q645 When using window.open for the second time on a already opened window, how can I bring the window in front of the main browser window?' |
-- div -->
|