IE8 window.opener problems
<p>Having problems with IE8...</p>

<p>I have a button that onclick fires the <code>showImageBrowser()</code> function.</p>

<pre><code>function showImageBrowser(params) {
var open = window.open('http://localhost/admin/browse?'+params,'newwin','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=950,height=500');
    if (!open) {
        alert('Could not open the image browser, please disable your popup blocker.');
    }
}
</code></pre>

<p>Now in the image browser when you click on an image it calls this function:</p>

<pre><code>function selectFile(url, el) {
    window.opener.replaceImage('Test_Image', url);
    window.close();
}
</code></pre>

<p>Which is calling the <code>replaceImage()</code> function in the parent window, as expeted.</p>

<p>This is the code:</p>

<pre><code>function replaceImage(el, url) {
  $('#'+el).html('&lt;a href="'+url+'" target="_blank" class="image"&gt;'+basename(url)+'&lt;/a&gt;');
  $("input[name='"+el+"']").val(url);
}
</code></pre>

<p>Now if you click on the original <code>showImageBrowser()</code> button for the second time, IE will bring up the window but this time it freezes for a few seconds and then you get the alert "Could not open the image browser, please disable your popup blocker."</p>

<p>This works fine in Firefox (obviously) but not in IE. I haven't even tried it in IE7/6 because if it doesn't work in 8 then I know I'm going to have problems.</p>

<p>Any advice?</p>
