View Full Version : Code Rotation?

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
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 type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
How can I make it run a different script every time?

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


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