• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 7. Using window and frame Proper... > Setting the Netscape Navigator’s Dim...

Setting the Netscape Navigator’s Dimensions

In the Netscape Navigator, you can resize the browser on-the-fly with the innerWidth, innerHeight, outerWidth, and outerHeight properties (see Table 7.2). Here’s an example that puts these properties to work, resizing the browser as you click buttons:

(Listing 07-05.html on the web site)

<HTML> 
    <HEAD> 
        <TITLE>Setting Window Size</TITLE> 
        <SCRIPT LANGUAGE="JavaScript"> 
            <!--
            var beginWidth = window.outerWidth
					var beginHeight = window.outerHeight
					function inner()
					{
					window.innerWidth = 400
					window.innerHeight = 400
					}
					function outer()
					{
					window.outerWidth = 400
					window.outerHeight = 400
					}
					function available()
					{
					window.outerWidth = screen.availWidth
					window.outerHeight = screen.availHeight
					}
					function restore()
					{
					window.outerWidth = beginWidth
					window.outerHeight = beginHeight
					} 
            // --> 
        </SCRIPT> 
    </HEAD> 
    <BODY> 
        <H1>Setting Window Size</H1> 
        <BR> 
        <FORM> 
            <INPUT TYPE="button" VALUE="Set inner dimensions" onClick="inner()"><BR>
					<INPUT TYPE="button" VALUE="Set outer dimensions" onClick="outer()"><BR>
					<INPUT TYPE="button" VALUE="Use available space" onClick="available()"><BR>
					<INPUT TYPE="button" VALUE="Restore original" onClick="restore()"><BR> 
        </FORM> 
    </BODY> 
</HTML> 

					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint