2

Possible Duplicate:
How to trigger f11 event of keyboard using javascript or jquery?

is it possible to use javascript or jquery to go to fullscreen on page load buy invoking "F11" key press

Community
  • 1
  • 1
user1334969
  • 57
  • 1
  • 5

3 Answers3

1

I guess you can use html5 fullscreen API

var element = document.getElementById("myDiv");
// Mozilla
video.mozRequestFullScreen();
// Webkit
video.webkitEnterFullScreen();
Akhil Sekharan
  • 12,467
  • 7
  • 40
  • 57
0
<html>
<head>
<script type="text/javascript">
function nWin() {
window.open( "http://www.google.com/", "myWindow", "fullscreen=1")
}
</script>
</head>
<body>
<form>
<input type="button" onClick="nWin()" value="FullScreen">
</form>
</body>
rOcKiNg RhO
  • 631
  • 1
  • 6
  • 16
-1

The short answer - yes. The long answer - it depends...

You can do a window.open() to open a new fullscreen window - however not to make the original one fullscreen. A downside of this is that most popup blockers today will prevent automatic window opening this way.

Another way is to provide a link on that landing page and bind the window.open function to an onclick event of this link. This should prevent the popup blocker issue and give you what you want.

In any case, you're left with an interaction from the user, which will be required in all scenarios.

Zathrus Writer
  • 4,311
  • 5
  • 27
  • 50