Reputation: 2115
I need to focus on window opened on further clicks on anchor tag. I have used the below function to do so.
function newwindow(url)
{
OpenWin = this.open(url,"mywindow");
OpenWin.focus();
}
OpenWin.focus() is not working on Mozilla Firefox. Is there any other solution to focus on window opened on further clicks on anchor tag?
Upvotes: 4
Views: 7975
Reputation: 16907
The checkbox does not exist anymore in newer ff versions
The only way to change the setting is the dom.disable_window_flip
about:config option
Upvotes: 3
Reputation: 16035
I assume that FF follows the HTML standard which states the following:
window . focus()
Focuses the window. Use of this method is discouraged. Allow the user to control window focus instead.
i.e. we are not able to do the window focusing.
Upvotes: 0
Reputation: 262919
You probably need to allow scripts to raise windows, since Firefox does not allow that by default.
In the Content
tab of the Options
dialog, click the Advanced...
button next to the Enable Javascript
check box, then check the Raise and lower windows
box in the resulting dialog.
Upvotes: 5
Reputation: 21778
You can disable/enable Javascript's window.focus
event from the Firefox options:
Go to Tools > Options > Content > Advanced > Raise or lower windows
There is no way to overwrite this option serverside, because it was made for exactly that purpose: Hindering windows from stealing focus. Your only option is to use model windows on top of your website, which are essentially "the new popup windows".
Upvotes: 0