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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I NEED A CODE THAT AUTO-MAXIMIZES THE WINDOW WHEN IT LOADS. 1

Status
Not open for further replies.

seba070707

Programmer
Joined
Aug 6, 2001
Messages
13
Location
AR
Hello.

I need an script or code that when it is executed, the window that calls it 'MAXIMIZES' AUTOMATICALLY.

For example, the Windows Program 'WORDPAD' MAXIMIZES automatically when it loads. I want the same for my HTML page.

Any help would be greatly appreciated. THANKS !!!!
 
you could compair the window size with the screen size, and if the window size is less, use window.resizeTo(x,y) where x is the number of pixels across in the x direction (left to right) and y is the number of pixels across in the y direction (top to bottom). then use window.moveTo(x,y) where x and y form the coordinate pair for the placment of the top-left corner of the browser window.

ex: window.moveTo(0,0) would put the window up in the very top-left corner of the screen

Hope that helps theEclipse
eclipse_web@hotmail.com
**\\||It was recently discovered that research causes cancer in rats||//**
 
yeah, rite:
seba, put this in the head:

function fullscreen(){
var w=screen.availWidth, h=screen.availHeight
window.moveTo(0,0)
window.resizeTo(w,h)
}
onload=fullscreen()

have 2 be workin.. regards, vic
 
use the resize option in javascript
<script>
top.opener.resizeTo(800,600);
</script>
you can give the screen dimensions to maximize the window.

Thanx,
sreeky
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top