Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q805 How can you get more precise control over the phsycial attributes of each new window using open.window?

irt.org | Knowledge Base | JavaScript | Window | Q805 [ previous next ]

Q805 How can you get more precise control over the phsycial attributes of each new window using open.window?

You can either have different instances of the window.open method in the document:

<SCRIPT LANGUAGE="JavaScript"><!--
window.open('http://www.irt.org','windowName1','width=400,height=400,toolbars=false');
window.open('http://www.irt.org','windowName1','width=400,height=400,toolbars=false,location=false,resize=false');
//--></SCRIPT>

Or you create your own function and pass it the required attributes:

<SCRIPT LANGUAGE="JavaScript"><!--
function myOpen(url,windowName,width,height,directories,location,menubar,scrollbars,status,toolbar,resizable) {
     var features =
         'width='        + width +
         ',height='      + height +
         ',directories=' + directories. +
         ',location='    + location +
         ',menubar='     + menubar +
         ',scrollbars='  + scrollbars +
         ',status='      + status +
         ',toolbar='     + toolbar +
         ',resizable='   + resizable;

    window.open (url, windowName, features);
}

myOpen('http://www.irt.org','windowName1',400,400,0,0,0,0,0,0,0);
myOpen('http://www.irt.org','windowName1',400,400,1,1,1,1,1,1,1);
//--></SCRIPT>

The first method is easiest.


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.