...

View Full Version : Code Rotation?



Crazydog
09-04-2006, 08:55 AM
Is it possible in javascript alone (or do I need to use php) to have different code show up each time a user loads the page?

I want to show different google adsense referral images
(http://img19.imageshack.us/img19/2272/3163au9.gif)
Every time a user reloads the page.

The code for one of them is something like this:



<script type="text/javascript"><!--
google_ad_client = "pub-4346037344594013";
google_ad_width = 120;
google_ad_height = 240;
google_ad_format = "120x240_as_rimg";
google_cpa_choice = "CAAQufGXhAIaCNsLc8WT4y4qKPG193M";
google_ad_channel = "";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
How can I make it run a different script every time?

mic2100
09-04-2006, 10:28 PM
you could modify this to fit around what you want to do.

http://www.codingforums.com/showthread.php?t=95049

all you will need to do is apply your code to the different switch statements.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum