0

Why the TARGET _BLANK parameter does not work, when there is onClick parameter? The onlick is google event script. When I add onclick to this link, it opens inside the frameset.

<a target=_blank href="externalwwwlink" onClick="recordOutboundLink(this, 'Link', 'aaa');return false;">OPEN </a>
Danil Speransky
  • 29,891
  • 5
  • 68
  • 79
Tom
  • 6,725
  • 24
  • 95
  • 159

2 Answers2

2

You return false here:

onClick="recordOutboundLink(this, 'Link', 'aaa'); return false;"

so it prevents usual behaviour (bubling of click event). It is very common way to prevent standard action (redirecting by reference, or submitting a form).

Danil Speransky
  • 29,891
  • 5
  • 68
  • 79
1

Your onClick handler has a return false at the end, which is an old way of telling the browser to stop handling the click. The browser will not open the link, and in your case, not open the href in a new (blank) window/tab.

Remove the return false; at the end of the onClick so the browser knows it can go on.

Community
  • 1
  • 1
Konerak
  • 39,272
  • 12
  • 98
  • 118