I've got this trouble and I was wondering if you can help me. I'm trying to maximize the window without showing any button or toolbar, and I wish it works in as much as possibles browsers.
Now I can get it with IE, but I can't with Chrome. I've been looking for a solution here but I haven't found any question similar (if it's I'm so sorry).
I've read that it could be easy using jQuery but I have no idea. I prefer to do it using JS Any suggestion or help will be wele!
I was using this but doesn't work for Chrome
I've got this trouble and I was wondering if you can help me. I'm trying to maximize the window without showing any button or toolbar, and I wish it works in as much as possibles browsers.
Now I can get it with IE, but I can't with Chrome. I've been looking for a solution here but I haven't found any question similar (if it's I'm so sorry).
I've read that it could be easy using jQuery but I have no idea. I prefer to do it using JS Any suggestion or help will be wele!
I was using this but doesn't work for Chrome
Share Improve this question edited Dec 12, 2013 at 9:12 user247702 24.2k18 gold badges115 silver badges160 bronze badges asked Oct 25, 2012 at 19:54 CarolCarol 5632 gold badges11 silver badges25 bronze badges 5- Post an example of what you got working in IE please. – invertedSpear Commented Oct 25, 2012 at 19:58
- 1 Fullscreen API has good support already: caniuse./#feat=fullscreen. See demo: johndyer.name/lab/fullscreenapi – dfsq Commented Oct 25, 2012 at 20:00
- I was using this for IE, but it doesn't work on Chrome, at least for me: <script> window.moveTo(0,0); if (document.all) { top.window.resizeTo(screen.availWidth,screen.availHeight); } else if (document.layers||document.getElementById) { if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){ top.window.outerHeight = screen.availHeight; top.window.outerWidth = screen.availWidth; } } window.focus(); </script> – Carol Commented Oct 25, 2012 at 20:13
- Possible duplicate of maximize window on document ready with jquery – Liam Commented Jan 11, 2018 at 11:47
- Possible duplicate of stackoverflow./questions/1125084/… – Ben Botvinick Commented Jul 17, 2018 at 23:33
1 Answer
Reset to default 1The best you can do is using window.resizeBy(x, y)
and window.resizeTo(x, y)