Can IE open a new tab or window in the same window as before?

351 views Asked by At

I would like to open a new window in IE and return to the same window if the same button is clicked again.

Here's my button:

<button id="appButton" onclick="openRequestedPopup()">
    Click 
</button>

Here's my function:

function openRequestedPopup() {

    var windowObjectReference = window.open(
        "https://www.google.com",
        "DescriptiveWindowName"
    );

    windowObjectReference.focus(); 
}

With this code, firefox and chrome will use the same tab it opened before but IE will continually open all new tabs/windows.

Is there a way to accomplish this in IE?

0

There are 0 answers