Setting a New Window’s Size
In Chapter 6, you learned how to open a link in a new window. JavaScript lets you control how big that window should be.
To set the size of a new window:
1. | Type <a href="javascript:location='current.html';, where current.html is the URL of the page that contains the link.
|
2. | Type window.open('nextpage.html', where nextpage.html is the URL of the page to be opened in the new window.
|
3. | Type 'label', where label is the name of the new window.
|
4. | Type 'height=h,width=w, where h and w are the desired height and width for the new window. (No spaces!)
|
5. | If desired, type ,chrome=yes, where chrome is scrollbars, toolbar, status, menubar, location, or resizable.
|
6. | If desired, type a, (comma) and repeat step 5 as desired. ... |
Get HTML, XHTML, & CSS, Sixth Edition: Visual QuickStart Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.