2

This was working the first time I tried it, would re-use the same tab as target if it exists and create if it does not

<a href="www.example.com/help/section3" target="helpTab" class="helpButton">Help</a> 

Later when I tried the link I noticed it was creating new tabs over and over if i clicked it multiple times, and not re-useing that tab it already made.

so I tried using the java window.open:

<a onclick="window.open('http://example.com/help/#section1', 'helpTab'); return false" class="helpButton">Help</a>

and still it keeps opening in new tabs over and over again.

what would cause it to stop working or what am I doing wrong?

Nolan Ritchie
  • 53
  • 1
  • 6
  • This is a duplicate http://stackoverflow.com/questions/13779508/open-url-in-new-tab-or-reuse-existing-one-whenever-possible – Joshua Duxbury Apr 10 '17 at 20:50
  • Possible duplicate of [open url in new tab or reuse existing one whenever possible](http://stackoverflow.com/questions/13779508/open-url-in-new-tab-or-reuse-existing-one-whenever-possible) – Joshua Duxbury Apr 10 '17 at 20:50
  • I can not reproduce the (strange) effect you are experiencing. The only way a new tab would be open on every visit to that link is that `target =_blank` (which is a reserved target aimed to do that behaviour). Might some scriptlet in your page have changed the value of the `target` attribute? Have you seen the _real_ target value through a developper's HTML monitor in your browser? – Little Santi Apr 10 '17 at 22:12
  • I get the same result when href is a different domain. – llessurt Mar 07 '23 at 21:11

0 Answers0