2 Replies Latest reply on Apr 20, 2011 9:01 PM by mikescott

    Rotating advertising images


      I have 24 ad sponsor images. I want 6 to appear on a page at any one time in a vettical column one under the other. One each page refresh/mouse click I want to rotate through all 24 images so that - over time - each one is diplayed the same number of times, and each one appears in each of the 6 positions.


      I can sort of do that using:


      <cfparam name="SponsorSwap" default="#randrange(1,24)#">




      <cfif SponsorSwap is "1"> image1, image2, image3, image4, image5, image6</cfif>

      <cfif SponsorSwap is "2">image2, image3, image4, image5, image6, image1<cfif>

      and so on...


      But that is a lot of code.


      Is there a better way to do this?


      Thank you