View Single Post
  #1 (permalink)  
Old May 16th, 2008, 01:15 AM
Gajender Gajender is offline
Registered User
 
Join Date: Feb 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Resizing and moving new window through opener

While studying "Navigating and opening new windows" under section "The window object", Chapter:5(JavaScript in the Browser), Page No:142 Book title: "Professional JavaScriptâ„¢ for Web Developers" by Nicholas C. Zakas, Wiley Publishing Inc. , I found following code which doesn't work actually.

var oNewWin = window.open("http://www.wrox.com/","wroxwindow",
"height=150,width=300,top=10,left=10,resizable=yes ");
oNewWin.moveTo(100, 100);
oNewWin.resizeTo(200, 200);

You can't move or resize the new opened window through 'oNewWin'. It gives "Permission denied" error.
You can only close that window by
oNewWin.close();

Can anyone tell me the way to do this?

Regards

Reply With Quote