Java banner rotator and Nofollow

Discussion in 'JavaScript' started by archangel, May 21, 2008.

  1. #1
    Hello, I'm new here
    I have a question: how can I add the nofollow tag to the links I have in this banner rotator?


    
    <script type="text/javascript">
    <!-- Begin
    rnd.today=new Date();
    rnd.seed=rnd.today.getTime();
    
    function rnd() {
            rnd.seed = (rnd.seed*9301+49297) % 233280;
            return rnd.seed/(233280.0);
    };
    
    function rand(number) {
    	var result = Math.ceil(rnd()*number);
    	if (!result)result++;
            return result
    };
    var ad_cnt2 = 2;
    var ad2 = rand(ad_cnt2);
    var link2;
    var adBanner2;
    var width2
    var height2
    if (ad2==1) {
    link2="http://TheSpiderWebSystem.com/greatnews";
    adBanner2="http://thespiderwebsystem.net/spiderweb/s/728x90_wide.gif";
    width2="728";
    height2="90";
    alt2="";
    }
    if (ad2==2) {
    link2="/paidads.html";
    adBanner2="/headerbanner.gif";
    width2="728";
    height2="90";
    alt2="";
    }
    document.write('<center><a href="' + link2 + '" target="_blank">');
    document.write('<img src="' + adBanner2 + '" width=' + width2 + ' height=' + height2 + ' border=0 alt="' + alt2 + '"></a>');
    document.write('</center>');
    // End -->
    </SCRIPT>
    
    Code (markup):

    Thank you!!
     
    archangel, May 21, 2008 IP
  2. dan.h

    dan.h Guest

    Messages:
    16
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    At the bottom

    [b]document.write('<center><a href="' + link2 + '" target="_blank" rel="nofollow">');[/b]
    document.write('<img src="' + adBanner2 + '" width=' + width2 + ' height=' + height2 + ' border=0 alt="' + alt2 + '"></a>');
    document.write('</center>');
    // End -->
    </SCRIPT>
    Code (markup):
     
    dan.h, May 21, 2008 IP