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
Manoj Ahirwar wrote:
i want to entire page, not only one container
Hi Tiago,
Try to verify this link,
https://www.jqueryscript.net/demo/Easy-Elements-Fullscreen-Plugin-with-jQuery/examples/
with jquery plugin
Thanks,
Balu
Balu wrote:
BaluHi
Not i looking for but thanks anyway =)
"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.
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.
"Failed to execute 'requestFullScreen' on 'Element': API can only be initiated by a user gesture."
Read this for more information.
I tested in my App OSMDb, and have the same result described above:
Regards.