I'm new to JavaScripts,so probably I did something wrong. I would like to use the window.open method to open a new non resizable window with a predefined size, and no scrollbar. In my HTML5 file I used the following lines:
<a href="credits.html" onclick="window.open(this.href, 'mywin','toolbar=no,resizable=no,scrollbars=no, status=no, left=20,top=20,width=500,height=400'); return false;">Credits</a>
The window displays correctly, the size is ok, but it is resizable and there is a scrollbar. I used Chrome as default browser.
-
resizable is IE only.Niels Steenbeek– Niels Steenbeek2016年02月16日 08:37:22 +00:00Commented Feb 16, 2016 at 8:37
3 Answers 3
scrollbars=yes|no|1|0 Whether or not to display scroll bars. IE, Firefox & Opera only
1 Comment
Check this SO answer:
window.open not resizable, scrollable
The values for resizable are 0, 1 , "no" and "yes", but resizable is IE only
Comments
Each user can configure their browser so that it opens a new tab instead of a new window.