html link > javascript link

Claudiu

Regular Member
Joined
Feb 28, 2009
Messages
374
Reaction score
112
Hi,

I have to transform my affiliate link from cj from html link to javascript link.
I've tried using their javascript but they won't let me place my own anchor text

How can I do this ?
 
Try this
Code:
<script language='javascript' type='text/javascript'> 
<!--
<a href="page.html">anchor text</a>
// --> 
</script>
 
it's not working at all .. tried it on localhost and the page is blank ..
maybe there's something missing there ..
 
Inside <head></head>
Code:
<script language="javascript">
function newwin() {
window.open("http://google.com");
}
</script>

Inside Body/Link:
Code:
<a href="javascript:newwin()">Click Here</a></p>
 
here's more simple (and working ;) )
Code:
<script language="javascript">
document.writeln('<a href="url">Link text<\/a>');
</script>
 
nice one gimme4free .. tho ... cj is using images as well for tracking the aff so I'm not sure this will work ..
av67976 .. :( it's showing the aff link, this being the reason I need javascript

bottom line .. still need help with this
 
Last edited:
nice one gimme4free .. tho ... cj is using images as well for tracking the aff so I'm not sure this will work ..
av67976 .. :( it's showing the aff link, this being the reason I need javascript

bottom line .. still need help with this
You can add the image to your page also, it's called a tracking pixel, it will be a 1x1 image so it can go anywhere really. If you are using a banner then have:
Code:
<a href="javascript:newwin()"><img src="http://image.com/image.jpg"></a>
 
Back
Top