I set the window size in two ways:

the first

box_window = window.open(self.options.form_url, '_blank', 'База знаний', 'resizable=yes,scrollbars=yes,top=50,left=50,width=400,height=400'); 

second

 box_window = window.open(self.options.form_url, '_blank', 'База знаний', 'resizable=yes,scrollbars=yes,top=50,left=50,width='+screen.availWidth+',height='+screen.availHeight+''); 

In all cases, in chrome version 25, the window opens in a small size (100x100).

What other ways are there to set the window size?

UPD

My question is exactly the size of the new window . That is how to make it work in the old version of chrome. And so the window opens correctly in all other versions of all browsers.

  • Well, I do not know how it can work for all other versions of browsers if the parameters are out of place jsfiddle.net/4fb56s85 - Alexey Shimansky

1 answer 1

If you look at the documentation on the method , you will see that the additional window options are passed to the third parameter for window.open, and not the fourth.

 var myAwesomeWindow = window.open('', '', 'resizable=yes,scrollbars=yes,top=50,left=50,width=400,height=400'); myAwesomeWindow.document.title = 'myAwesomeTitle'; 
  • How does your code differ from my first version? - Marina Voronova
  • one
    @MarinaVoronova probably by the fact that the third parameter, for window.open, is not the fourth. %) - Alexey Shimansky
  • @MarinaVoronova, carefully reread line number two of my answer pzhlsta) You can several times until you understand. - Duck Learns to Take Cover
  • @ The duck is now a monolith%) - Aleksey Shimansky