By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,208 Members | 1,592 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,208 IT Pros & Developers. It's quick & easy.

window.moveTo "Access is denied" error

P: n/a
Hi All,

This one is a bit bizarre. My understanding of "Access is denied" with
respect to window.moveTo is that it results from a request which would
move a portion of the window off screen.

The window in question is 480 high by 1000 wide. The screen dimensions
are 1024x768. The move request is to 10,10, which would put the max
right coordinate of the window at 1010 and the max bottom coordinate at
490. Both coordinates are clearly within the accessable area of the
screen.

The code works fine on server A, but not on server B. Both servers are
identical environments (SuSE Linux, Apache, all the same versions).
Not only that, the code works fine using Firefox on either server.
Only IE throws the error, and only on server B.

Any comments or suggestions would be greatly appreciated.
Thanks,
-Dave H.

Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Dave Hammond" <dh****@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Hi All,

This one is a bit bizarre. My understanding of "Access is denied"
with
respect to window.moveTo is that it results from a request which would
move a portion of the window off screen.

The window in question is 480 high by 1000 wide. The screen
dimensions
are 1024x768. The move request is to 10,10, which would put the max
right coordinate of the window at 1010 and the max bottom coordinate
at
490. Both coordinates are clearly within the accessable area of the
screen.

The code works fine on server A, but not on server B. Both servers
are
identical environments (SuSE Linux, Apache, all the same versions).
Not only that, the code works fine using Firefox on either server.
Only IE throws the error, and only on server B.

Any comments or suggestions would be greatly appreciated.
Thanks,
-Dave H.


Same origin policy is preventing you from moving a window that contains
content from a domain that the script was not loaded from. The following
works on a page loaded from my local hard disk:

var w = window.open('about:blank', 'name', 'width=1000,height=480');
w.moveTo(10, 10);

The following does not work on a page loaded from my local hard disk:

var w = window.open('http://www.yahoo.com', 'name',
'width=1000,height=480');
w.moveTo(10, 10);

If both servers are on the same domain but different hosts, you may be
able to by-pass the problem with document.domain = 'yourdomain.com';

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #2

P: n/a
Thanks for the info re: origin policy. In this case, the window opens
a page which is within the same server (and domain), however the url
specifies a different port. I will run a few tests to determine if
this may be the issue. Of course, the strange thing is that (as I had
stated), the problem only occurs on one of two identical servers
running identical code.

Anyway, thanks again.

-Dave H.

Jul 23 '05 #3

P: n/a
"Dave Hammond" <dh****@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Thanks for the info re: origin policy. In this case, the window opens
a page which is within the same server (and domain), however the url
specifies a different port. I will run a few tests to determine if
this may be the issue. Of course, the strange thing is that (as I had
stated), the problem only occurs on one of two identical servers
running identical code.

Anyway, thanks again.


One server might be part of your "Trusted sites" list, or may be
considered part of your "Local intranet zone", either of which could
potentially have more permissions than the "Internet zone".

Also, https: sites tend to have more permission in IE than http:

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.