Javascript popup for pdf
<p><strong>I require to open 2 popup windows and first one contain a button to open second which use to open a pdf. here if i made few changes in values(it contain textbox) on button click to open second it reload the second. but focus not transfer to second window</strong>.</p>

<p>I attach old post here which i try but still same problem I have.</p>

<p>I think I've got a better solution that doesn't involve closing the window first. The issue is that IE won't override a window (PDF or otherwise) if you attempt to open it again with an empty URL (i.e., ''). It will override a PDF with a non-empty URL, however. That could be a file, but about:blank works even better (which is what an empty URL does normally).</p>

<p>Depending on how your code is written, you may still want the try/catch, but this should eliminate the need:</p>

<pre><code>windowHandle = window.open('about:blank',name,attributes);
windowHandle.document.location.href = url;
windowHandle.focus();
</code></pre>

<p>about:blank will force the PDF out of the child window and allow you to do what you need to do. It might not be a bad idea to place the setting of the URL and focus() in a windowHandle.onload() handler, so there aren't any timing issues with disposing of the PDF. I.e.:</p>

<pre><code>windowHandle.onload=function(){
    windowHandle.document.location.href = url;
    windowHandle.focus();
};
</code></pre>

<p>Thanks</p>

<p>My main problem is calling windowHandle.focus(); which generate error with pdf.</p>
