Forum Moderators: open
I need some help with a link. It works OK, but I'd like it to open in the same window. Right now it opens a new one. Here's the code:
<a href="http://www.somewhere.com" onclick="window.open('http://www.somewhere.com/index.asp?trackerid=38001');return false">a product</a>
Any advice much appreciated.
Texas
<a href="http://theaffiliatelink.com/tracking/blahblah/" target="_top" onmouseover="window.status='http://www.merchantsite.com';return true;" onmouseout="window.status=' ';return true;">Your Link Text</a>
If a visitor is surfing with javascript turned off, you will still get credit for the click. I don't think that would be the case with the way you showed in the first post.
Again, using the following link config, does anyone know how to get the link to open in the main window instead of opening a new one?
<a href="http://www.somewhere.com" onclick="window.open('http://www.somewhere.com/index.asp?trackerid=38001');return false">a product</a>
However, you know what? I've been thinking. Although this technique hides an affiliate link completely and it does open the aff coded url in the main window, at the same time it can also be defeated by any average user, even inadvertantly.
If a visitor right clicks to copy the shortcut, then pastes the link into the address bar, the affiliate tracking code will fail. If a visitor right clicks then selects open in a new window (as many people have learned to do), then again your affiliate code will be lost.
The more I think about it, I'm more inclined to use either a refresh page (url redirect) as I have been using, or buckworks' old-time favorite above using the status bar disguise.
Many thanks to all replies,
Texas