Question by Kyle Supe
I have tried searching for an answer to this but my searches have come up empty handed. Its tough to even figure out what terms to search for. Basically what I have is a list of products. I have the functionality in place where you click the picture and it opens a new tab directing you to an external link where you can buy the product using target =_blank in my a href. I would also like the picture to direct to another internal link where you can comment on and rate the product and just open it in the same tab that the original page is on (so you would essentially have to hit back to return to the main product list. Is this possible to do and if so how?
Thanks in advance for any guidance.
Answer by Riateche
<a href="url for new tab" target="_blank" onclick="location.href = 'url for current tab'">Link</a>
Answer by Starx
Its pretty simple, use an
onclick handler combined with
<a href="#yourinternallink" onclick="window.open('popup.html')"> <img src="link/to/my/image.jpg" /> </a>