jplwebdesign - 12:53 am on Nov 15, 2005 (gmt 0) SAMPLE ASP CODE <% stDisplayImage1 = int(rnd * 2) + 1 <%end if%>
Hi all - I thought I'd share this piece of code I use to randomize ads on pages. I know adsense allows you to randomize a particular ad, but I wanted a way to randomize different sized ads, not just colors. The below code does exactly this. Feel free to mess around with it. It can be programmed to randomize an infinite number of ads and colors. I use this on several web sites.
dim images1, stDisplayImage1
<%if stDisplayImage1 = 1 then%>
----adsense code #1
----adsense code #2
SAMPLE ASP CODE
stDisplayImage1 = int(rnd * 2) + 1