Saber_Ryan1
01-08-2004, 03:09 PM
I've gotten an ad rotator script from a website, but after filling in all the required lines with my URLs, I get an error when trying to view the page some times. Here's what the error says, "A Runtime Error has occurred. Do you wish to Debug? Line: 55 Error: Expected ';'". So there seems to be an error on line 55 - can someone figure out what it is, please?.. Here's the script for you all (with my URLs in it):
<SCRIPT>
// put info for randomly selected banners here, as in the examples
gfx0="http://rcm-images.amazon.com/images/G/01/associates/promotions/b1c-468x60.gif";
lnk0="http://www.amazon.com/exec/obidos/redirect?tag=mgsonline-20&creative=92489&camp=8117&link_code=dl1&path=subst/misc/amazon-cobrand-cc/v3/marketing-from-associates-step1.html/ref%3Db1_assoc_26";
alt0="Amazon.com Platinum Visa Card";
gfx1="http://www.mgsonline.net/home-banner-468x60.gif";
lnk1="http://www.amazon.com/exec/obidos/redirect-home/mgsonline-20";
alt1="In Association with Amazon.com";
gfx2="http://www.cafepress.com/cp/banners/cp_referral_468x60.gif";
lnk2="http://www.cafepress.com/cp/info/storeref.aspx?refby=mgsonline";
alt2="Design and Sell Merchandise Online for Free";
gfx3="http://www.alienware.com/affiliate_pages/banners/gaming_pc_banner_468x60.gif";
lnk3="http://www.alienware.com/index.aspx?from=_R__Y__A__N_:gaming_pc_banner_468x60";
alt3="Alienware - Gaming PC for PC Gaming";
len=4; // change to equal number of banners
today=new Date();
today=today.getTime()/10;
rnd=today%len;
document.writeln('<A HREF="'+eval("lnk"+rnd)+'"><IMG SRC="'+eval("gfx"+rnd)+'" ALT="'+eval("alt"+rnd)+'" WIDTH="468" HEIGHT="60"></A>');
</SCRIPT>
Line 55 (of the HTML document) is, by the way, the line that begins with, "document.writeln". See any problems in that line? Help would be greatly appreciated!
Thanks in advance,
<SCRIPT>
// put info for randomly selected banners here, as in the examples
gfx0="http://rcm-images.amazon.com/images/G/01/associates/promotions/b1c-468x60.gif";
lnk0="http://www.amazon.com/exec/obidos/redirect?tag=mgsonline-20&creative=92489&camp=8117&link_code=dl1&path=subst/misc/amazon-cobrand-cc/v3/marketing-from-associates-step1.html/ref%3Db1_assoc_26";
alt0="Amazon.com Platinum Visa Card";
gfx1="http://www.mgsonline.net/home-banner-468x60.gif";
lnk1="http://www.amazon.com/exec/obidos/redirect-home/mgsonline-20";
alt1="In Association with Amazon.com";
gfx2="http://www.cafepress.com/cp/banners/cp_referral_468x60.gif";
lnk2="http://www.cafepress.com/cp/info/storeref.aspx?refby=mgsonline";
alt2="Design and Sell Merchandise Online for Free";
gfx3="http://www.alienware.com/affiliate_pages/banners/gaming_pc_banner_468x60.gif";
lnk3="http://www.alienware.com/index.aspx?from=_R__Y__A__N_:gaming_pc_banner_468x60";
alt3="Alienware - Gaming PC for PC Gaming";
len=4; // change to equal number of banners
today=new Date();
today=today.getTime()/10;
rnd=today%len;
document.writeln('<A HREF="'+eval("lnk"+rnd)+'"><IMG SRC="'+eval("gfx"+rnd)+'" ALT="'+eval("alt"+rnd)+'" WIDTH="468" HEIGHT="60"></A>');
</SCRIPT>
Line 55 (of the HTML document) is, by the way, the line that begins with, "document.writeln". See any problems in that line? Help would be greatly appreciated!
Thanks in advance,