954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Full screen

Hi ppl,
i have a prob here. i'm trying to do a webpage and putting it in a cd for viewers to view. so i found the script below to open a full screen windows. it work! but the prob is that it opens two pages. one normal window and a full screen window. any ways to code it in order to get just one full screen windows? thanks in advance :)


tootytoot
Newbie Poster
1 post since Jun 2006
Reputation Points: 10
Solved Threads: 0
 
campkev
Posting Pro in Training
484 posts since Jul 2005
Reputation Points: 14
Solved Threads: 19
 

The window close in the suggestion will require a confirm if the page was not opened by a script. An alternative is to obtain the screen size and to moveto and resize the window to be ful screen.

John.Nye
Newbie Poster
6 posts since Jun 2006
Reputation Points: 10
Solved Threads: 0
 
The window close in the suggestion will require a confirm if the page was not opened by a script. An alternative is to obtain the screen size and to moveto and resize the window to be ful screen.


That's in Internet Explorer; Firefox will refuse to close the window at all.
(And the "fullscreen" window Firefox generates will just be a normal size windows sans the top toolbars.)

Darkmeerkat
Newbie Poster
12 posts since Feb 2006
Reputation Points: 10
Solved Threads: 0
 

Hi

I have the same problem, I want the page to be fullscreen when a user enters the page

sbonder
Newbie Poster
8 posts since Jan 2010
Reputation Points: 10
Solved Threads: 0
 
window.onload = function () {
window.moveTo(0, 0);
window.resizeTo(screen.availWidth, screen.availHeight);
}

works in IE, Firefox, Safari.

Workaround(s) may be available for Opera and/or Chrome.

fxm
Posting Pro
596 posts since Apr 2010
Reputation Points: 40
Solved Threads: 74
 

Thanks FXM, but this code doesnt seem to work. Can you please send me
the rest of it maybe, am not good with javascript

sbonder
Newbie Poster
8 posts since Jan 2010
Reputation Points: 10
Solved Threads: 0
 
window.onload = function () {
window.moveTo(0, 0);
window.resizeTo(screen.availWidth, screen.availHeight);
}

works in IE, Firefox, Safari.

Workaround(s) may be available for Opera and/or Chrome.

Thanks FXM, but this code doesnt seem to work. Can you please send me
the rest of it maybe, am not good with javascript

sbonder
Newbie Poster
8 posts since Jan 2010
Reputation Points: 10
Solved Threads: 0
 

Insert this

<script type="text/javascript">
    window.onload = function () {
        window.moveTo(0, 0);
        window.resizeTo(screen.availWidth, screen.availHeight);
    }
</script>

before the tag.

Either ship the CD with one of the browsers in which it works or wait for a cross-browser version.

Note: this code assumes that there are no existing onload= functions in the page(s) to be displayed. If there are, it gets a bit more complicated.

fxm
Posting Pro
596 posts since Apr 2010
Reputation Points: 40
Solved Threads: 74
 

Thanks I tyed the code and it doesnot work, thanks for your help

sbonder
Newbie Poster
8 posts since Jan 2010
Reputation Points: 10
Solved Threads: 0
 
Thanks I tyed the code and it doesnot work

Don't tye - or type - use copy-and-paste.

Which browser are you using? Have you made sure that javascript is enabled?

Note: some browsers can be configured to disable resizing. Opera purports to support both moveTo() and resizeTo() but I couldn't get them to work here. Chrome doesn't work here either, but I haven't found any claim of support.

fxm
Posting Pro
596 posts since Apr 2010
Reputation Points: 40
Solved Threads: 74
 

I am using firefox 3.5.9 and javascript is enabled an all. I got this code from
the internet and it works:

But the problem with this code is that it opens another window and make it full screen. What I want is for the current screen to be Full screen on load.

Thanks

sbonder
Newbie Poster
8 posts since Jan 2010
Reputation Points: 10
Solved Threads: 0
 

In Firefox 3.6.3 the code I gave you works perfectly here.

fxm
Posting Pro
596 posts since Apr 2010
Reputation Points: 40
Solved Threads: 74
 

thanks anyway, i'll find another way

sbonder
Newbie Poster
8 posts since Jan 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You