New window in the foreground
I have an HTML link on my main page that opens a new window. The new window is displayed well in the foreground.
Now I reclick another link on my main page, the result is displayed in the window above. So far so good.
My only worry is that the window does not appear in the foreground.
Re: New window in the foreground
You have the focus method in JavaScript. If its page is called by this link, you can do like this
<script type="text/javascript" src="focuswindow.js"> </ script>
and you create a file focuswindow.js places where you just
window.onload = function () {window.focus(this);}
Re: New window in the foreground
You can try this:
Code:
window. onload = function ( e ) { var w = ( ( e && e. currentTarget ) || this ) ; w. focus ( ) } ;
It should work as standard (Firefox) or move (IE)
Re: New window in the foreground
The trouble, once I open my new window, it starts in the foreground (the focus is on the new window). I reduced the new window (without closing it), to return to the original page. I click on another link
IE:
The page reloads well in the open window above, and the latter appears in the foreground.
In Firefox:
The page reloads well in the open window above, but the focus remains on the original page.
Here is the code for my link:
Code:
<a onclick="window.open('test.html','test','toolbar=0, location=0, directories=0, status=0, scrollbars=yes, resizable=0, copyhistory=0, menuBar=0, width=740, height=480')" style="cursor: pointer;">test</a>
Re: New window in the foreground
I know where the trouble: in Firefox, you go into Tools> Options> Content, and you click the button next to Enable JavaScript, you will find an option on whether to permit the fact of putting forward windows.