Mega Code Archive

 
Categories / JavaScript Tutorial / Window
 

Window outerWidth

The outerWidth property references the pixel width of the browser's frame. This includes any of the toolbars or other "chrome" that make up the frame itself. <html>     <head>     <script language="JavaScript1.2">     <!--     function openWin(){       var myBars = 'directories=no,location=no,menubar=no,status=no';       myBars += ',titlebar=no,toolbar=no';       var myOptions = 'scrollbars=no,width=400,height=200,resizeable=no';       var myFeatures = myBars + ',' + myOptions;       var newWin = open('', 'myDoc', myFeatures);       newWin.document.writeln('<h4>Properties for this Window</h4>');       newWin.document.writeln('innerHeight: ' + newWin.innerHeight + '<br>');       newWin.document.writeln('innerWidth: ' + newWin.innerWidth + '<br>');       newWin.document.writeln('outerHeight: ' + newWin.outerHeight + '<br>');       newWin.document.writeln('outerWidth: ' + newWin.outerWidth + '<br>');       newWin.document.writeln('<form>');       newWin.document.writeln('<input type=BUTTON value="Close"');       newWin.document.writeln(' onClick="window.close()">');       newWin.document.writeln('</form>');       newWin.document.close();     }     -->     </script>     </head>     <body>     <form>       <input type=BUTTON value="Open" onClick="openWin()">     </form>     </body>     </html>