Skip to main content
Participating Frequently
September 10, 2007
Question

Javascript to make the browser full-screen after launching a Presenter presentation

  • September 10, 2007
  • 1 reply
  • 898 views
Say gang...

Is there any Javascript I can put in the index.htm file that Presenter generates that'll do the equivalent of hitting the F11 button to make the browser window full-screen? Or get rid of all the toolbars and address bars and junk?

I know it can be done, because other sites do it.

Thanks, guys!

Cheers!

Gregory
This topic has been closed for replies.

1 reply

Jorma_at_Knox
Legend
September 10, 2007
Gregory,

In the home.html file:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0014)about:internet -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Load Preso</title>

<script type="text/javascript">

var screenWidth;
var screenHeight;

screenHeight = top.screen.availHeight;
screenWidth = top.screen.availWidth;

</script>
</head>
<body>

<input id="openPreso_btn"
value="Load Presentation"
type="button"
onclick="window.open('index.htm','fs','fullscreen=1, width=' + screenWidth + ', height=' + screenHeight + '');" />
</body>
</html>


Specifically the on click line:

onclick="window.open('index.htm','fs','fullscreen=1, width=' + screenWidth + ', height=' + screenHeight + '');" />

by telling it to go full scree in will remove the browser chrome.

Jorma@RealEyes
September 11, 2007
If you have Presenter compile your presentation to the hard drive, you can modify the index.htm it provides, and everything works just fine as long as you launch it locally. However, if you're distributing your presentation via the Breeze server, keep in mind it *doesn't* use the local index.htm you modified and uploaded - it makes its own. I've run into this myself when using the older "fscommand" trick to communicate between Flash and the presentation's wrapper.
Participating Frequently
September 11, 2007
That's okay. We're not even using Breeze/Connect at work at all (even though I think we should). We're using our own internal web server for distribution, so the world is my banana--so to speak. :-)