Hello, can I get an idea how to programmatically submit a form, which opens the returned document in new background tab/window?

Basically this could be done by creating new HTMLFormElement object having target property set to “_blank” and calling submit() method, but the method always takes the focus to the new tab, could it be done that the new tab does not “steal” the focus from current one?

As far as I know, this is not possible. You can’t tell the browser what to with an opened URL (even opening it in a new tab or a new window is a matter of browser setting, i.e. user preference). Sure, the target property provides some options, but that’s about it. And IMHO there is a good reason for this, it would be very easy to abuse this functionality.