1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

html link > javascript link

Discussion in 'Cloaking and Content Generators' started by Claudiu, May 22, 2009.

  1. Claudiu

    Claudiu Regular Member

    Joined:
    Feb 28, 2009
    Messages:
    288
    Likes Received:
    81
    Location:
    127.0.0.1
    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 ?
     
  2. av67976

    av67976 Registered Member

    Joined:
    Mar 15, 2009
    Messages:
    56
    Likes Received:
    9
    Try this
    Code:
    <script language='javascript' type='text/javascript'> 
    <!--
    <a href="page.html">anchor text</a>
    // --> 
    </script>
     
  3. Claudiu

    Claudiu Regular Member

    Joined:
    Feb 28, 2009
    Messages:
    288
    Likes Received:
    81
    Location:
    127.0.0.1
    it's not working at all .. tried it on localhost and the page is blank ..
    maybe there's something missing there ..
     
  4. gimme4free

    gimme4free Executive VIP Jr. VIP Premium Member

    Joined:
    Oct 22, 2008
    Messages:
    1,919
    Likes Received:
    1,941
    Home Page:
    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>
     
    • Thanks Thanks x 1
  5. av67976

    av67976 Registered Member

    Joined:
    Mar 15, 2009
    Messages:
    56
    Likes Received:
    9
    here's more simple (and working ;) )
    Code:
    <script language="javascript">
    document.writeln('<a href="url">Link text<\/a>');
    </script>
     
    • Thanks Thanks x 1
  6. Claudiu

    Claudiu Regular Member

    Joined:
    Feb 28, 2009
    Messages:
    288
    Likes Received:
    81
    Location:
    127.0.0.1
    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: May 22, 2009
  7. gimme4free

    gimme4free Executive VIP Jr. VIP Premium Member

    Joined:
    Oct 22, 2008
    Messages:
    1,919
    Likes Received:
    1,941
    Home Page:
    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>
     
    • Thanks Thanks x 1