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.

asked Feb 16, 2016 at 8:33
1
  • resizable is IE only. Commented Feb 16, 2016 at 8:37

3 Answers 3

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

answered Feb 16, 2016 at 8:38
Sign up to request clarification or add additional context in comments.

1 Comment

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.
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

answered Feb 16, 2016 at 8:36

Comments

-1

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

answered Feb 16, 2016 at 8:44

1 Comment

Concerning the possibility to open a new tab I am aware of it, but I have to open a new window.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.