Open URL in the same window from different tabs

Let's say I have this function in javascript on my webpage that loads a url from a text field with a url id:

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

If I open two tabs in my browser and open my web page on both tabs, I want both tabs to open the URL in the same window, and not two separate windows. Is it possible?

In other words, I want to customize a window open from another tab.

+4
source share
2 answers

You cannot control the user's browser behavior: just add "_blank" as the target windows and hope that your user will have a fairly recent web client that opens a new tab and not a new window.

+1

, ( , ) Firefox IE, Chrome Safari.

Firefox IE, , , Chrome Safari, , , "urlwindow", A, 'urlwindow', B.

, . . Chrome/Safari:

+1

All Articles