If you wanted to open both pages at the same time you could always combine both of the techniques mentioned above.
<a href="thispage.html" target="_blank" onclick="window.open('thatpage.html');">Double Link</a>
This will open the pages thispage.html
and thatpage.html
simultaneously.
dont forget to add the title
attribute to your link as opening new windows/tabs without warning users is generally frowned upon. Something like;
title="Clicking this link will open two new tabs"
should keep the standardistas off your back.
Also, you may want to separate your onclick
event from your html
as again munging them all together really isnt best practice. If you are using jquery then assign the onclick
event by inserting a small piece of JavaScript at the top of your page as such;
$(function(){
$('#the-link-id').click(function(){
window.open('thatpage.html');
});
);