Click to See Complete Forum and Search --> : Auto window resize


raystt
02-05-2003, 03:30 PM
Does anyone have a code to make a window automatically resize to its maximum on load.

I've tried everything and can't get it to work.

Please Help and Thank You.

Sergey Smirnov
02-05-2003, 04:50 PM
<script language="JavaScript">
function maxwin() {
window.moveTo(0,0);
window.resizeTo(screen.availWidth,screen.availHeight);
}
</script>

....

<body onload="maxwin()">

IxxI
02-05-2003, 05:05 PM
Is there any way to incorporate that into the properties of a frame so that no matter the resolution the frame always loads so that all of it can be seen?
IxxI

Sergey Smirnov
02-05-2003, 05:22 PM
If page contains frames, it is possible to put script into the frameset

I just have tested the following one and it works:

<html>
<head>
<title>Resize test</title>
<script language="JavaScript">
window.moveTo(0,0);
window.resizeTo(screen.availWidth,screen.availHeight);
</script>
</head>

<frameset rows="150,*">
<frame name="f1" src="http://www.internet.com">
<frame name="f2" src="http://forum.exadel.com">
</frameset>