javascript - IE8 window.opener problems -


Problems with IE8 ...

I have a button that says to onclick showImageBrowser () function.

showImageBrowser (parameter) {var open = window.open ('http: // localhost / admin / browse?' + Paramomas, 'newwin', 'toolbar = 0, location = 0, directory = 0, position = 1, menubar = 0, scrollbar = 1, resizable = 1, width = 950, height = 500 '); If (! Open) {warning ('Image Browser can not be opened, please disable your popup blocker.'); }}

Now when you click on an image in the image browser, it calls this function:

  Select function file (url , El) {window.opener .replaceImage ('Test_Image', url); Window.close (); }  

which is calling the replacement image () function in the original code, such as expeted.

This code is:

The copy image of the function (L, URL) {$ ('#' + L). HTML ('& lt; a href =' '+ url +' "target =" _ blank "class =" image "& gt; '+ basename (url) +' & lt; / a & gt; '); $ ("Input [name = '' + L + '']") Val (url). }

Now if you click on the original showImageBrowser () button for the second time, the IE will bring the window but this time it will freeze for a few seconds And then you get a warning "Image Browser can not be opened, please disable your popup blocker."

It works fine in Firefox (obviously) but not in IE. I have not even seen it in IE 7/6, because if it does not work in 8, then I know that I'm going to have problems.

Any advice?

I do not know the background behind it but it seems that IE has an existing window .open will not window - maybe for security purposes, I do not know

You can try to change newwin by random every time (different) , Which every time you call showImageBrowser () .


Comments