Microsoft KB Archive/269658

= BUG: Renavigation of Existing Window Through window.open Creates a New Window Under Internet Explorer 5.5 =

Article ID: 269658

Article Last Modified on 10/26/2007

-

APPLIES TO


 * Microsoft Internet Explorer 5.5

-



This article was previously published under Q269658



SYMPTOMS
When you call the window.open method on an existing window, a new window is created when you set the replace parameter to true.



RESOLUTION
To resolve this problem, you can keep track of the window handle and use the location.replace method to renavigate the window if the window already exists. When you use location.replace, you ensure that the new navigation replaces the current entry in that browser window's history.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
The following generic HTML code reproduces the problem:  

function handle_openwindow(location) { window.open(location,&quot;mystatic_window&quot;,null,true); }

 

  The following code is a possible workaround for the preceding example:   var my_window_handle

function handle_openwindow(location) {

if (typeof my_window_handle == &quot;object&quot;) { my_window_handle.location.replace(location); }       else { my_window_handle = window.open(location,&quot;mystatic_window&quot;,null,true); } }

 

 </HTML>

<div class="references_section">