Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How can I switch off the automatic window size and set the size of the window manually

  • 4 replies
  • 10 have this problem
  • 176 views
  • Last reply by axdr

more options

I need to open the web-page in a window of a certain size. The javascript function window.resizeTo (w, h) does not work. If I open the window using the window.open ("", "", "width: w, height: h, ..."), there is another problem. The hyperlinks that have to be opened in a new tab in the same window or at least in the window of the same size, will open in another tab of the first window from which I called window.open(). I do not know what it is, bug or as intended, but the normal full-featured window with the right size I cannot get.

In Russian: Мне нужно открыть страницу в окне определенных размеров. Из консоли Firebug с помощью javascript пробовал window.resizeTo(w,h) - не работает. Если открывать окно с помощью window.open("", "", "width:w, height:h, ..."), то возникает другая проблема: ссылки, которые должны окрываться в новой вкладке в том же окне или хотя бы в окне того же размера, открываются в другой вкладке первого окна, из которого я выполнял команду window.open(), которое неправильного размера. Не знаю, что это. Баг или так задумано. Но открыть нормальное полноценное окно с нужными размерами не получается никак.

Modified by axdr

Chosen solution

I can adjust the precise dimensions if I see it during window resize using JavaScript. So you put me into the right direction. Thank you.

Read this answer in context 👍 0

All Replies (4)

more options

You should be able to resize that window with the mouse, but you can't do that via JavaScript.


See also:

more options

How to resize a window with the mouse to the size for example 1000x800 ? Why html A-element with target=_blank results new tab in the parent window but not in the same window and not in a new window? Main question: How to get a normal full-featured window with the right precise size? A not to reduce the security level. If you have an answer please post.

more options

You need an extension if you want to set the window dimensions to a specific value or you need to open a pop-up window with window.open and specify the width and height.
Otherwise a new window opens with some default dimensions as saved in localstore.rdf and you can't easily adjust the dimensions via JavaScript in that case.

more options

Chosen Solution

I can adjust the precise dimensions if I see it during window resize using JavaScript. So you put me into the right direction. Thank you.