0

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.

Upax
  • 141
  • 1
  • 8

3 Answers3

1

Check this SO answer:

window.open not resizable, scrollable

The values for resizable are 0, 1 , "no" and "yes", but resizable is IE only

Community
  • 1
  • 1
allu
  • 381
  • 1
  • 8
1

scrollbars=yes|no|1|0 Whether or not to display scroll bars. IE, Firefox & Opera only

Source: http://www.w3schools.com/jsref/met_win_open.asp

Dennis
  • 3,962
  • 7
  • 26
  • 44
  • 1
    My first trial was with 0 and 1, but I got exactly the same results I had with no/yes. It seems that the scrollbars=1 is ignored. – Upax Feb 16 '16 at 10:59
-1

Each user can configure their browser so that it opens a new tab instead of a new window.

  • 1
    Concerning the possibility to open a new tab I am aware of it, but I have to open a new window. – Upax Feb 16 '16 at 10:59