944,184 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Jun 1st, 2006
0

Full screen

Expand Post »
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


<SCRIPT LANGUAGE="JavaScript">
if (this.name!='fullscreen'){
window.open(location.href,'fullscreen','fullscreen,scrollbars')
}
</script>
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tootytoot is offline Offline
1 posts
since Jun 2006
Jun 1st, 2006
0

Re: Full screen

<SCRIPT LANGUAGE="JavaScript">
if (this.name!='fullscreen'){
window.open(location.href,'fullscreen','fullscreen,scrollbars')
window.close(this)
}
</script>
Reputation Points: 14
Solved Threads: 19
Posting Pro in Training
campkev is offline Offline
484 posts
since Jul 2005
Jun 2nd, 2006
0

Re: Full screen

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
John.Nye is offline Offline
6 posts
since Jun 2006
Jun 3rd, 2006
0

Re: Full screen

Quote originally posted by John.Nye ...
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.)
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Darkmeerkat is offline Offline
12 posts
since Feb 2006
May 19th, 2010
0
Re: Full screen
Hi

I have the same problem, I want the page to be fullscreen when a user enters the page
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sbonder is offline Offline
8 posts
since Jan 2010
May 19th, 2010
0
Re: Full screen
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. window.onload = function () {
  2. window.moveTo(0, 0);
  3. window.resizeTo(screen.availWidth, screen.availHeight);
  4. }
works in IE, Firefox, Safari.

Workaround(s) may be available for Opera and/or Chrome.
fxm
Reputation Points: 40
Solved Threads: 74
Posting Pro
fxm is offline Offline
591 posts
since Apr 2010
May 19th, 2010
0
Re: Full screen
Thanks FXM, but this code doesnt seem to work. Can you please send me
the rest of it maybe, am not good with javascript
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sbonder is offline Offline
8 posts
since Jan 2010
May 19th, 2010
0
Re: Full screen
Click to Expand / Collapse  Quote originally posted by fxm ...
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. window.onload = function () {
  2. window.moveTo(0, 0);
  3. window.resizeTo(screen.availWidth, screen.availHeight);
  4. }
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sbonder is offline Offline
8 posts
since Jan 2010
May 19th, 2010
0
Re: Full screen
Insert this
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <script type="text/javascript">
  2. window.onload = function () {
  3. window.moveTo(0, 0);
  4. window.resizeTo(screen.availWidth, screen.availHeight);
  5. }
  6. </script>
before the </head> 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
Reputation Points: 40
Solved Threads: 74
Posting Pro
fxm is offline Offline
591 posts
since Apr 2010
May 19th, 2010
0
Re: Full screen
Thanks I tyed the code and it doesnot work, thanks for your help
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sbonder is offline Offline
8 posts
since Jan 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: Run multiple php through AJAX
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: tag that shows hand on mouseover





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC