The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

banner rotation not working on portal :(

2 posters

Go down

banner rotation not working on portal :( Empty banner rotation not working on portal :(

Post by tyhodge07 February 12th 2008, 9:16 pm

i got a banner rotation code that finally works, but than when i add it to my portal, it doesnt work :/

what could the problem be?

heres the code im using:

Code:
<center><scripthtml type="text/javascript"><!-- Beginrnd.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_cnt1 = 5;var ad1 = rand(ad_cnt1);var link1;var adBanner1;var width1var height1if (ad1==1) {link1="http://www.killerhobbies.com/items/losi/losi-micro-t-vehicles/list.htm";adBanner1="http://i32.servimg.com/u/f32/11/88/77/67/killer12.jpg";width1="400";height1="70";alt1="Killer Hobbies.com";}if (ad1==2) {link1="http://stores.ebay.com/BRP-Sales";adBanner1="http://i32.servimg.com/u/f32/11/88/77/67/brplog11.jpg";width1="169";height1="70";alt1="BRP";}if (ad1==3) {link1="http://www.atomicmods.com/Categories/Team-Losi-Micro-T.aspx";adBanner1="http://i273.photobucket.com/albums/jj227/micromodz/atomicmodz-1.jpg";width1="400";height1="70";alt1="AtomicMods.com";}if (ad1==4) {link1="http://www.thetoyz.com/cart/thetoyz_categories.lasso?cat_id=710&cat_name=MICRO%20T%20&%20MICRO%20BAJA&action=list";adBanner1="http://i273.photobucket.com/albums/jj227/micromodz/thetoyzmicrotforum.jpg";width1="400";height1="70";alt1="TheToyz.com";}if (ad1==5) {link1="http://www.onlybatterypacks.com/items.asp?db=49";adBanner1="http://i27.servimg.com/u/f27/11/88/77/67/onlyba10.jpg";width1="400";height1="70";alt1="OnlyBatteryPacks.com";}document.write('<center><a href="' + link1 + '" target="_new">');document.write('<img src="' + adBanner1 + '" width=' + width1 + ' height=' + height1 + ' border=0 alt="' + alt1 + '"></a>');document.write('</center>');// End --></SCRIPT></center>
tyhodge07
tyhodge07
Forumember

Male Posts : 708
Reputation : 5
Language : english
Location : indiana

http://rcmodzone.all-up.com/

Back to top Go down

banner rotation not working on portal :( Empty Re: banner rotation not working on portal :(

Post by tyhodge07 February 14th 2008, 6:15 pm

can anyone help?
tyhodge07
tyhodge07
Forumember

Male Posts : 708
Reputation : 5
Language : english
Location : indiana

http://rcmodzone.all-up.com/

Back to top Go down

banner rotation not working on portal :( Empty Re: banner rotation not working on portal :(

Post by tyhodge07 February 15th 2008, 5:27 pm

still no answer, basically does java script not work on the portal, if not than t hat answers the question Rolling Eyes
tyhodge07
tyhodge07
Forumember

Male Posts : 708
Reputation : 5
Language : english
Location : indiana

http://rcmodzone.all-up.com/

Back to top Go down

banner rotation not working on portal :( Empty Re: banner rotation not working on portal :(

Post by Guest February 16th 2008, 8:32 pm

yes it should. Did you click that a/a button before you entered that script in the custom box when you made it for the portal.
avatar
Guest
Guest


Back to top Go down

banner rotation not working on portal :( Empty Re: banner rotation not working on portal :(

Post by Decibel February 16th 2008, 9:30 pm

Code:
<SCRIPT>
banner0= "banner link here";
banner1= "banner link here";
banner2= "banner link here";

var ran_unrounded=Math.random()*2;
var ran_number=Math.round(ran_unrounded);

document.write(eval("banner"+ran_number));
</SCRIPT>
Just change the *2 to correspond to how many banners you want randomed. Note that 2 is actually 3, as it starts at 0.(banner0)...banner4="banner link here"; would change it to *3 and so on.
Decibel
Decibel
Forumember

Male Posts : 201
Reputation : 10
Language : english
Location : Canada

http://decibels.forumsmusic.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum