Why doesn't code after a window.open call get executed?
<p>I have some very simple javascript code that looks like this:</p>

<pre><code>var newWindow = window.open("","");
if (newWindow != null)
{
   newWindow.document.write("&lt;HTML&gt;&lt;HEAD&gt;&lt;TITLE&gt;hi&lt;/TITLE&gt;&lt;/HEAD&gt;");
   newWindow.document.close();
}

document.getElementById('status1').innerHTML = "opened a new window";
</code></pre>

<p>But for some reason the document.getElementById... part never gets called. Is this expected, or am I doing something wrong? (Yes, status1 is defined)</p>
