I want a browser to go full screen as soon as my page loads. Is it possible in javascript. I know the shortcut key for this F11 but requirement is on page load only.
After reading the solution provided below. I achieved full screen but here i got a trap. I was using timer to make my page postback to get fresh data after every 5 second. And here I found after every 5 sec new window opens up but I want full screen to go only once and next time content gets refreshed there itself.
I want a browser to go full screen as soon as my page loads. Is it possible in javascript. I know the shortcut key for this F11 but requirement is on page load only.
After reading the solution provided below. I achieved full screen but here i got a trap. I was using timer to make my page postback to get fresh data after every 5 second. And here I found after every 5 sec new window opens up but I want full screen to go only once and next time content gets refreshed there itself.
Share Improve this question edited Sep 14, 2010 at 6:27 Shantanu Gupta asked Sep 14, 2010 at 5:57 Shantanu GuptaShantanu Gupta 21.1k56 gold badges186 silver badges293 bronze badges 1- Kiosk mode (full screen with hidden menu, which F11 does) can't be done through Javascript for security reasons. Related: stackoverflow./questions/1125084/… – tadamson Commented Sep 14, 2010 at 6:14
4 Answers
Reset to default 2function OpenfullScreen(URL) {
window.open(URL, '', 'fullscreen=yes, scrollbars=auto');
}
call this function from where you are opening the page
you can use the window.open('yourlocation.htm', 'New window name', 'fullscreen=1');
NOTE THAT fullscreen is ONLY supported in I.E. browser. Not remended to use since it is browser dependent.
Function Specification
the format of window.open() is window.open (URL, windowName[, windowFeatures])
URL is the URL page you trying to open windowName is the name given to this window
Windowfeatures is the additional parameter you would like this window to have
- status -status bar at the bottom of the window. e.g. "status=1"
- toolbar -standard browser toolbar, with Back and Forward button etc. e.g. "toolbar=0" mean no toolbar location
- Location entry field where you enter the URL. e.g. "location=0"
- menubar -menu bar of the window e.g. "menubar=1"
- directories -The standard browser directory buttons e.g. "directories=1"
- resizable -Allow/Disallow the user to resize the window. e.g. "resizble=0"
- scrollbars -Enable the scrollbars if the document is bigger than the window e.g. "scrollbars=1"
- height -Specifies the height of the window in pixels
- width -Specifies the width of the window in pixels.
function OpenfullScreen(URL) {
window.open(URL, '', 'fullscreen=yes, scrollbars=auto, resizble=yes, status=yes, toolbar=yes,menubar=yes, scrollbars=no');
}
You can specify the width and height of the page too.
you can use <meta http-equiv="refresh" content="5" /> to refresh the browser in every 5 seconds.
place this code in the new window instead of the one that call it