[RESOLVED]Open Page in Full screen.

Hi ,

             I am using HTML  .I want to open page in full screen without pressing F11 .Its like suppose there is index.html page when i click on that page to open it should open in full screen mode.

Would you want webpages opening themselves on your machine in full-screen? If the user wants to view full screen he’ll press F11.

Yes it themselves open in full screen.No i dont want user to click F11.I want that page open in full screen mode.

I’m asking would you want a website opening in full screen.  If you wouldn’t want that to happen on your machine then no-one else wants that to happen on their machines either.  If you could open pages full screen it would be a boon to advertisers,
spammers, malware etc etc etc.  This can’t be done.

yes i want website to open in full screen.

hi,

Try Following,

for Opening html page e.g 1.html in fullscreen try following

<!DOCTYPE html>
<html>
<body onLoad="OpenPageinFullScreen();">

FULL SCREEN PAGE
<script> function OpenPageinFullScreen() { window.open('1.html', "FrameCheck", "fullscreen,scrollbars='no',statusbar='yes'").focus(); //set new window as the opener to bypass alert window.opener = 'FrameCheck'; window.open('', '_self'); //close original window that was the inital opener without alert window.close();} </script> </body> </html>

This will help you to open page in full screen but as Said by
AidyF
 this is not a good way !!!

 For opening other page in fullscreen based on event use following

your Main page will be

<!DOCTYPE html>
<html>
<body>

<p>Click the button to open a new browser window.</p>

<button onclick="OpenPageinFullScreen()">Try it</button>

<script>
function OpenPageinFullScreen() {    
window.open('2.html', "FrameCheck", "fullscreen,scrollbars='no',statusbar='yes'").focus();
        //set new window as the opener to bypass alert
        window.opener = 'FrameCheck';
        window.open('', '_self');
        //close original window that was the inital opener without alert
        window.close();}
</script>

</body>
</html>

for opening ’2.html’ in full screen

<!DOCTYPE html>
<html>
<body>

2

</body>
</html>

Keep both pages in same folder and try.

Regards,

Ajay

 like below

 

Pop-up blockers and other in-browser checks will stop that kind of code executing for many people.

Hi

      @ajay .I tried your code its opening window its not.Opening page in full screen .I want page to open like F11.

Sorry But i m new to this.

You can’t do this.  It might not be the answer you want, but I’m afraid it is the answer nonetheless.

Can we do like this .On my index.html page i have some links user clicks on that link and redirect to another page.

Can i open that page in full screen mode ?

Index.html -> topbooks.html

I want to open topbooks.html in full screen when user click on link.

Hi,

See the full screen API for example at
http://www.sitepoint.com/use-html5-full-screen-api/
 but note that as pointed preivously, it requires a user action for safety reason and user convenience…

omkar.kulkarni

want to open topbooks.html in full screen

Because?  Is this actually a "new window" or really full screen? For the later you can’t as the user have to stay in control so you can suggest a full screen mode but the user will ultimately decide.

omkar.kulkarni

Can i open that page in full screen mode ?

No.  It doesn’t matter how many times you ask, the answer will always be the same.

hope this help you
www.davidwalsh.name/fullscreen

Thanks everyone .

Leave a Reply