Have you ever wanted to open up 2 windows from 1 click? Me too! Back in 2008 I signed up to a number of affiliate programs for one website where the landing page I wanted wasn’t a viable target for a referral URL. In other words I wanted to direct the visitor to a certain page whilst still getting credit if they did sign up so this required opening 2 windows from the 1 click. Sounds simple and it was but now in 2013 I’ve discovered I made a massive mistake that has cost me god only knows how many thousands of pounds.
<a href="http://www.mysite.com/referralurl" target="_blank" onclick="window.open('http://www.mysite.com/targetredirect')">Click Here</a>
Like I said, very simple.
What makes it even worse is that the fix is so simple. If you want to stop Internet Explorer throwing a pop-up exception when opening 2 windows all you have to do is make sure you don’t set a target for the original anchor tag. So instead of having
<a href="http://www.somesite.com" target="_blank" onClick="..... you just have <a href="http://www.somesite.com" onClick="....
As simple a fix to as costly a mistake as I would ever like to make.