Redirect to a new tab within javascript file

Use the method window.open(url, target) to open a new window (it depends on the browser or the user’s settings whether the URL is opened in a new window or tab):

window.open('http://stackoverflow.com', '_blank');

For more information about window.open(), read the documentation at w3schools.

Please note: Randomly opening a new window (or tab) isn’t allowed in most browsers, because it is then treated as an “unwanted popup”.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)