Permission denied in IE using window.open ()?

IE gives me permission denied when I use window.open to open a window with a browser button. I am not getting the error on Firefox or Chrome. What should I do?

The code:

<button type="button" onClick="window.open('https://www.example.com','newWindow');">
My button
</button>

      

+2


a source to share


1 answer


Are you running it from localhost

or file://

? If so, then this is indeed the default behavior. You can configure this somewhere in the browser settings forest. But if you are indeed using it from a real domain, then IE also emits this error in some cases when the url points to a different domain. Browser security settings seem to be too strict. To fix this, you need to adjust your browser settings accordingly.



However, this does not eliminate the risk that one of your customers using IE will get the same issue. If you insist on opening the xref in a new window, I would suggest using <a>

with instead target="_blank"

(although this attribute is deprecated in HTML, you can do it rel="ext"

and run some JS at load time to give the a[rel=ext]

target attribute).

+4


a source







All Articles