Tuesday, 25 May 2010

Javascript Window Woes!

I'm trying to get windows to resize in Javascript, this sounds simple however it turns out to be a pain in the backside.

I am opening a window using window.open() and then trying to resize it and reposition it using resizeto() and moveto(), this is fine in FireFox but in Internet Explorer I hit issues. Because the page in the child window that I open is hosted on a different domain than the parent page IE hits you with a Permission Denied error.

For now I have got around it by defining the height and width in the window.open() command but this is far from perfect as it does not guarantee the position of the browser on the screen.

No comments: