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!

fullscreen onload

Status
Not open for further replies.

soonkhoo

Programmer
Dec 8, 2000
133
MY
Hi.. how do I make the browser fullscreen when I first load a page? Thanks.

Soon
 
you might try something like this:

if (document.clientHeight!=screen.height || document.clientWidth!=screen.width) document.resizeTo(screen.height,screen.width)

not sure about the document.clientHeight, and document.clientWidth tho. they just represent the size of the browser. theEclipse
eclipse_web@hotmail.com
**\\||It was recently discovered that research causes cancer in rats||//**
 
This'll do it -

<script language=&quot;JavaScript1.2&quot;>
<!--
window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById) {
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
//-->
</script>

Be careful with the pipes ||
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top