Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

resize window (maximize) 1

Status
Not open for further replies.

MarcDePoe

Programmer
Dec 19, 2000
101
US
Can I maximize a browser window with javascript?
 
yep...

window.resizeTo(screen.height, screen.width);

i think this is IE only. adam@aauser.com
 
found something others may find useful ... (I know I do)

if (document.all) // IE
var xMax = screen.width, yMax = screen.height;
else if (document.layers) // netscape
var xMax = window.outerWidth, yMax = window.outerHeight;
else // play safe
var xMax = 640, yMax=480;
 
theres also screen.availWidth and screen.availHeight for IE that accounts for the taskbar on the screen. adam@aauser.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top