Hemant Kothiyal
Hemant Kothiyal

Reputation: 4152

Open browser in Full screen

net website, I would like to add button by which user can view the page in Full Screen mode and switch back to Normal mode. [This is same as happens with F11]

I have seen many javascript code but all of them is opening new window in full screen.

But i would like have same window in Full screen

If it happn then i will put that button in MASTER page.

Please help?

Upvotes: 0

Views: 13404

Answers (3)

CD..
CD..

Reputation: 74166

I don't think it is possible to do what you are asking.

The only possible way is using window.open:

<span onclick="window.open('http://www.yourdomain.com/page.html','', 'fullscreen=yes, scrollbars=auto');">Open Full Screen Window</span>

(I'm not sure it's a good idea to force a user to use full screen mode...)

Upvotes: 7

bogdanbrudiu
bogdanbrudiu

Reputation: 564

ugly solution but it works



<head>  
   <script type="text/javascript"> 
        function max() 
        { 
            var obj = new ActiveXObject("Wscript.shell"); 
            obj.SendKeys("{f11}"); 
        } 
    </script> 
</head> 
<body onload="javascript:max()">
</body>

Upvotes: 2

Bragi Ragnarson
Bragi Ragnarson

Reputation: 523

User already has this button, it's called F11.

DO NOT try to be 'smart'. This kind of functionality is in browser's scope, not in web application scope. It should not be your concern at all.

Instead focus on features that are truly relevant to your application.

Upvotes: 2

Related Questions