I would like to have a button that redirects to a given URL and opens in a new tab. How can this be done?
You can forget about using JavaScript because the browser controls whether or not it opens in a new tab. Your best option is to do something like the following instead:
This will always open in a new tab regardless of which browser a client uses due to the target="_blank"
attribute.
If all you need is to redirect with no dynamic parameters you can use a link with the target="_blank"
attribute as Tim Büthe suggests.