Window.open does not work when connected to onload event in chrome and safari

I attached some javascript to the onload event of the form. this script contains window.open. Although this works fine in all browsers, window.open does not open a new window and does not give nay an error message in google chrome and firefox.

I want to first check the screen resolution, if it is less than 1024, then I will open it in a new window without a menu, toolbar and others, so that the user has more space for work.

+3
source share
2 answers

This is a feature, not a mistake! :)

90-, ? , - JavaScript - ; .

+7

, click button, , , . , , , . , .

+3

Source: https://habr.com/ru/post/1706019/


All Articles