1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

javascript link help

Discussion in 'JavaScript' started by tamilsoft, May 20, 2008.

  1. #1
    Hi,

    I am using javascript to generate links for my affiliate sites to avoid huge number of outbound links for crawlers [ I don't want to use "nofollow" option].


    It works fine for normal clicks, but if a user trying to right click & "open in new window option", It gives problem....

    Anyone help me to solve this


    thanks in advance
     
    tamilsoft, May 20, 2008 IP
  2. vpguy

    vpguy Guest

    Messages:
    275
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <a href="javascript:void(0);" onclick="this.href='http://www.domain.com/'; return true;">anchor text</a>
     
    vpguy, May 20, 2008 IP
  3. tamilsoft

    tamilsoft Banned

    Messages:
    1,155
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes it works well in FF, but not in IE:(
     
    tamilsoft, May 21, 2008 IP
  4. vpguy

    vpguy Guest

    Messages:
    275
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You're right, sorry. Use onmousedown instead of onclick.
     
    vpguy, May 21, 2008 IP