I’m having problem with getting location.hostname for newly created window in javascript.
For example I have following situation:
var win_handler = window.open(‘/window parametars/’);
I would like to grab hostname from this new window and compare it with main window hostname, for example something like this:
if (win_handler.location.hostname == window.location.hostname) { //do
something}
And this works perfect on safari, opera, firefox, chrome …
But with ie im having problem, it says “Permission denied”?
Does anyone know how to solve this to work on ie also?
It sounds like you’ve violating the Same Origin Policy.