Can you review my javascript

Discussion in 'JavaScript' started by rayraypico, Aug 12, 2008.

  1. #1
    This is the code I use for my ads on my website. For some reason the correct pictures are not showing on the code? I was wondering if anyone could give me advise on this. I am by no means a java expert so let me know what you think.

    The images are NSFW so you may not want to open the links to the images if your are at work

    <table align="center" bgcolor="#FFFFFF" border="1" style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; text-align:left;" width="986" cellpadding="2" cellspacing="4" bordercolor="#888888">
    <tr><td bgcolor="#EEEEEE">
    <div id="r">
    <SCRIPT LANGUAGE="JavaScript">
    adengage_num_ads = 5;
    adengage_layout_type = "horiz";
    adengage_show_your_ad_here = 0;
    adengage_yourlink_text = "";
    adengage_show_powered_by = 0;
    adengage_show_click_count = 0;
    adengage_class_suffix = adengage_layout_type;
    adengage_arrow_text = "";
    window.adengage_draw_break = 0;
    window.adengage_use_image = 1;
    window.adengage_image_size = 100;
    window.adengage_hide_desc = 1;
    </SCRIPT><SCRIPT SRC="http://adcode.adengage.com/js/ae_38570_adbox.js" LANGUAGE="JavaScript"></SCRIPT>
    </div>
    <script>
    var z=0, im=new Array('http://cache.imagefap.com/images/thumb/40/119/1197371784.jpg\’,’http://img155.imagevenue.com/img.ph...mg.php?image=85182_rrrr_123_529lo.jpg’);var t = document.getElementById('r').getElementsByTagName('table')[0];
    var img = t.getElementsByTagName('img');
    for (var i=0;i<img.length;i++) {
    if (img.src.substr(0,12) != "http://stats") img.src=im[z++];
    }
    </script>
    </td></tr>
    </table>
     
    rayraypico, Aug 12, 2008 IP