-1
I’m trying to open a new window without losing the focus of the main but it doesn’t work:
function openUrl() {
window.open(url);
window.focus();
}
-1
I’m trying to open a new window without losing the focus of the main but it doesn’t work:
function openUrl() {
window.open(url);
window.focus();
}
0
(Translation) Original response here
What you are looking for is called "pop-under window"
var handle = window.open()
handle.blur()
window.focus()
However, it is not a guarantee, as the user’s browser settings can override this behavior, especially pop-up blockers.
I did local tests, and really going to have a big problem with pop-up blocker, my suggestion is to open tabs.
Browser other questions tagged javascript
You are not signed in. Login or sign up in order to post.