Popup window issue
<p>I have a question regarding the popup window.</p>

<p>I have</p>

<pre><code> ajax callback funtion....

       var popup = window.open("popup.html", "popup","width=1000, height=600, scrollbars=yes");
        if (window.focus) {popup.focus()}
    popup.document.write("&lt;table id='popupData'&gt;&lt;tr&gt;&lt;td&gt;test&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;");




button1  click -&gt;call ajax

button2  click -&gt;call ajax
</code></pre>

<p>My codes will creata a popup window when I click button 1 or button 2 the first time.</p>

<p>However, if I didn't close the first popup window and click button1 or button2 again,
My browser lose focus (I want the focus on the new popup window.
Also, The new popup window will open a different webpage (index page in my case).</p>

<p>I am not sure what's going on here. Can someone helps me out plz? </p>
