javascript - Open URL in same window from different tabs -


Assume that a javascript on my web page contains this function that loads the URL from the text file with the id URL Is:

  function loadUrl () {var url = document.getElementById ('url'). Values; window.open (url, 'urlwindow'); }   

If I open two tabs in my browser and open my web page in both tabs, then I want both tabs to open the URL in a single window, two different Do not have windows. Is this possible?

In other words, I want to target opening a window from another tab.

You can not control the user's browser behavior: just add it as the target window "_blank "And hope your user has a web client recently that opens a new tab and there is no new window.

Comments

Popular posts from this blog

mysql - where clause in inner join query -

java - Why my included JSP file won't get processed correctly? -

php - MySQL Query for Advanced Search multiple criteria -