/    Sign up×
Community /Pin to ProfileBookmark

Auto window resize

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.

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@Sergey_SmirnovFeb 05.2003 — <script language="JavaScript">

function maxwin() {

window.moveTo(0,0);

window.resizeTo(screen.availWidth,screen.availHeight);


}

</script>

....

<body onload="maxwin()">
Copy linkTweet thisAlerts:
@IxxIFeb 05.2003 — 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
Copy linkTweet thisAlerts:
@Sergey_SmirnovFeb 05.2003 — 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>
×

Success!

Help @raystt spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...