I have access to a joomla edition but not the source, and I need add a link which must be opened in other window/tab.
I only can change the href field content.
I try with
javascript:window.open('http://url/')
this work with chrome but not with firefox.
any suggestion?
According to MDN, window.open() requires a minimum of two arguments. It also returns the object for the newly opened window, which would cause
[object Window]to appear in the original window. Returningundefinedavoids this second issue. This would work:Older code would commonly use the
voidoperator, which evaluates its only operand and yields anundefinedresult no matter what. So this would also work:In either case, the special window name
_blankjust tells the browser to open a new window or tab. The browser’s settings determine the exact behavior because tabbed browsing was introduced after_blankwas.