Why can I get an error using moveTo in JavaScript?

I am opening a new window using var myWindow = window.open (...) button. Then I want to move this window to the desired location on the screen. I use myWindow.moveTo (10,10) to do this, but I get an Access Denied error.

The window that opens contains information from another server to which I am executing. When not, the window moves correctly. Is this a limitation and is there a way around it?

I am using IE7. (Work for an existing intranet that includes a lot of ActiveX so all users are using IE7)

+1


source to share


2 answers


You can try to put information from another site in an iframe that is on the same host that runs window.open JavaScript. Or maybe even better, get server side information and present it directly from your site. There may be problems with the iframe.



+3


source


The window that opens contains information from another server to which I am executing. When not, the window moves correctly. Is this a limitation and is there a way around it?



The browser security model has become increasingly constrained over the past few years. What you could have done a few years ago is no longer allowed. Blame him for advertising campaigns.

+1


source







All Articles