With JavaScript it is possible to focus on a specific browser tab, assuming I know which tab this is? If so, how?
With JavaScript it is possible to focus on a specific browser tab, assuming I know which tab this is? If so, how?
Lucas,
As mentioned here there is no effective method and 100% reliable to launch a specific browser tab.
You can use the window.focus () function, but remember that it will probably be blocked in most of browsers, so do not let your application depend on this function.
Example:
var myWindow = window.open("", "", "width=200, height=100"); // Abre uma nova janela
myWindow.document.write("<p>A new window!</p>"); // Adiciona um texto na nova janela
myWindow.focus(); // Passa o foco para nova janela.