genious. Pure genious :)
I got this off of easycfm.com.
So far it worked I will let you know and award points.
Thanks
Main Topics
Browse All TopicsI am trying to use the randrange function to randomize some banners I have. Problem is, it doesn't seem to be going any higher then the number 4
<cfif #story.categoryID# eq 3 OR #story.categoryID# eq 9 OR #story.categoryID# eq 13>
<cfparam name="bannerswap" default="#randrange(1, 5)#">
<cfif bannerswap is "1">
<cfinclude template="random1.cfm">
<cfelseif bannerswap is "2">
<cfinclude template="random2.cfm">
<cfelseif bannerswap is "3">
<cfinclude template="random3cfm">
<cfelseif bannerswap is "4">
<cfinclude template="random4.cfm">
<cfelseif bannerswap is "5">
<cfinclude template="random5.cfm">
</cfif>
<cfelse>
<cfparam name="bannerswap" default="#randrange(1, 7)#">
<cfif bannerswap is "1">
<cfinclude template="random6.cfm">
<cfelseif bannerswap is "2">
<cfinclude template="random7.cfm">
<cfelseif bannerswap is "3">
<cfinclude template="random8.cfm">
<cfelseif bannerswap is "4">
<cfinclude template="random9.cfm">
<cfelseif bannerswap is "5">
<cfinclude template="random10.cfm">
<cfelseif bannerswap is "6">
<cfinclude template="random11.cfm">
<cfelseif bannerswap is "7">
<cfinclude template="random12.cfm">
</cfif>
</cfif>
Notice how I have 1, 7 or 1, 5. Well, I cfoutputed bannerswap and it would never go above the number 4. It would do 1,2,3,4 but never 5,6,7.
Why is that.
Thanks
Bryan
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: entrance2002Posted on 2004-10-29 at 19:30:42ID: 12450160
Hello jag5311!
How about changing the following codes :
<cfparam name="bannerswap" default="#randrange(1, 5)#">
<cfparam name="bannerswap" default="#randrange(1, 7)#">
Into these codes :
<cfset bannerswap = randrange(1, 5)>
<cfset bannerswap = randrange(1, 7)>
Hope this helps. Just try it.
Goodluck!
eNTRANCE2002 :-)