homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / WebmasterWorld / Webmaster General
Forum Library, Charter, Moderators: phranque

Webmaster General Forum

How do i resize a window to full screen?!
Resize or resizing a window to full screen, Does this code exist?

5+ Year Member

Msg#: 3792262 posted 12:35 am on Nov 23, 2008 (gmt 0)

I am building a webpage and need a code that will allow me to resize the current window to fullscreen. I first thought i could do it using a simple onLoad="blah blah" command or some kind of creative javascript/html tag but it has proven quite frustrating.

If anyone can help me please do. My continued mental stability and intelectual aragence depend on it!

For all of you that may have moral issues with traping users in a seemingly unescapeble fullscreen trap, rest assured its for personal use only.



WebmasterWorld Administrator phranque us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Msg#: 3792262 posted 1:00 am on Nov 23, 2008 (gmt 0)

welcome to WebmasterWorld [webmasterworld.com], Baxter30!

do you have any code to post that you have tried that "almost works"?

perhaps something like this will do your trick:
<title>Full Screen</title>
<script language="JavaScript" type="text/javascript">
function fullScreen(){
<body onLoad="fullScreen()">


5+ Year Member

Msg#: 3792262 posted 1:32 am on Nov 23, 2008 (gmt 0)

The code you've posted is close but this function will only maximize the width and height of the screen. I am looking for a code that will resize to true fullscreen(all you will see is the content of the page and no address bar, toolbars, or status bar will be availible.

I can open a fullscreen window useing a code like this:


<body onLoad="window.open('indexh.html', 'index', 'fullscreen'); ">


But this will leave two windows open. I have tried combining this with onLoad="self.close()". But this will prompt the user to close the window, and thats just annoying. I've also tried to find ways to minimize the first window automatically after opening the second but failed(if anyone else can, toss it in).

I've seen others try things like this:

<script type="text/javascript">
function max()
var obj = new ActiveXObject("Wscript.shell");
<body onload="javascript:max()">

But most people don't like having thier computers invaded. And this aproach will prompt you relentlessly as well as not providing a true full screen effect(you can access the adress bar and tool bars). Got any other ideas?

[edited by: Baxter30 at 1:33 am (utc) on Nov. 23, 2008]

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / Webmaster General
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved