<html>
<head>
<script language="JavaScript">
// We can't set anything inside a given webpage to
// go full screen when opened. We have to another
// html to start the page we really want in full
// screen, and close this starter page afterwards.
// Remember that we need to use Alt-F4 or Ctrl-w
// to close that full screen page.
function fullScreen( url )
{
// Open a new window in full screen mode
window.open( url, "", "fullscreen=yes" );
// Prevent the close window prompt from popping up
window.opener = 'x';
// Close this current window itself
window.close();
}
</script>
</head>
<body onload="fullScreen( 'webpage.html' );">
</body>
</html>
Sunday, January 24, 2010
Forcing a webpage to open in full screen with javascript
If you want to force a webpage you write, e.g. webpage.html, to go full screen when others access it. The following is a way to do it by creating a driver page to launch the real page.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment