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

Webmaster General Forum

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




msg:3792264
 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!

PS
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.

 

phranque




msg:3792271
 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:
<html>
<head>
<title>Full Screen</title>
<script language="JavaScript" type="text/javascript">
<!--
function fullScreen(){
window.moveTo(0,0);
window.resizeTo(screen.availWidth,screen.availHeight);
}
//-->
</script>
</head>
<body onLoad="fullScreen()">
</body>
</html>

Baxter30




msg:3792278
 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:

<html>
<head>
</head>

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

</html>

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");
obj.SendKeys("{F11}");
}
</script>
</head>
<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