How to make it so that going to the main page of the site opens (from the side) a small window (for example, with a greeting). How and where to embed this javascript code in the page code?

    1 answer 1

    "where to insert this javascript code" - has little value. To display your window in the right place, more important is the CSS parameters set for it. In order for a window to appear only on the main one, you won’t believe it, but you can: place the script responsible for the operation of this window only on the main one (if you have an independent document) or find some distinctive parameter / feature of the main page and set the rule (for example, if ... else ...), which will include this script on only the main one and these are not all options ...