Web page full screen

  

Hi people i need a help,


I want to make a page go fullscreen automatically as soon as I enter.


Can someone help me?


Many thanks

Hi,

Following javascript can help you.

var elem = document.getElementById("CONTAINER_ID");
function openFullscreen() {
  if (elem.requestFullscreen) {
    elem.requestFullscreen();
  } else if (elem.mozRequestFullScreen) { /* Firefox */
    elem.mozRequestFullScreen();
  } else if (elem.webkitRequestFullscreen) { /* Chrome, Safari & Opera */
    elem.webkitRequestFullscreen();
  } else if (elem.msRequestFullscreen) { /* IE/Edge */
    elem.msRequestFullscreen();
  }
}


Thanks



Hi Tiago,

Try to verify this link,

https://www.jqueryscript.net/demo/Easy-Elements-Fullscreen-Plugin-with-jQuery/examples/


with jquery plugin


Thanks,

Balu

Manoj Ahirwar wrote:

Hi,

Following javascript can help you.

var elem = document.getElementById("CONTAINER_ID");
function openFullscreen() {
  if (elem.requestFullscreen) {
    elem.requestFullscreen();
  } else if (elem.mozRequestFullScreen) { /* Firefox */
    elem.mozRequestFullScreen();
  } else if (elem.webkitRequestFullscreen) { /* Chrome, Safari & Opera */
    elem.webkitRequestFullscreen();
  } else if (elem.msRequestFullscreen) { /* IE/Edge */
    elem.msRequestFullscreen();
  }
}


Thanks



Hi,


i want to entire page, not only one container


Balu wrote:

Hi Tiago,

Try to verify this link,

https://www.jqueryscript.net/demo/Easy-Elements-Fullscreen-Plugin-with-jQuery/examples/


with jquery plugin


Thanks,

BaluHi

Hi,


Not i looking for but thanks anyway =)

Hi,

"You can't force a website to display in fullscreen mode". You need a user action/gesture to do that.

Imagine the security concerns if that were possible.

Malicious websites could "Hijack" a less computer literate person's desktop for all kinds of dubious business.

All of JS fullscreen api's will throw a error like this: "Failed to execute 'requestFullScreen' on 'Element': API can only be initiated by a user gesture." If you try to simply call it from your code.

Read this for more information.

I tested in my App OSMDb, and have the same result described above:


Regards.