PDA

Click to See Complete Forum and Search --> : How do I make images change out on page visits to homepage?


Lonepine
06-10-2005, 06:18 PM
Does anyone know how to make images change out on page visits in Dreamweaver? I.e., you return to the home page, and there's a different image there on the return than the first time?

For example, sometimes when I visit the Apple.com website and then come back to it a few minutes later it will have new images on it. How can I do this using Dreamweaver?

Thanks!

keith1
06-10-2005, 07:29 PM
It's probably a behaviour. It's called something like random image swap. Here I found something that I think you're talking about: http://www.macromedia.com/cfusion/exchange/index.cfm?view=sn121&extID=1007302

Lonepine
06-10-2005, 08:23 PM
Whoa! That was weird I just pulled that same page up from Dreamweaver Exchange on Macromedia's site. Thanks, Keith! This is what I'm looking for.

DesignIt
06-13-2005, 05:34 PM
Here's what I used:

<cfparam name="cookie.visitnum" default="0">
<cfset cookie.visitnum = cookie.visitnum+1>
<CFIF cookie.visitnum gt 3>
<cfset cookie.visitnum = 1>
</cfif>

<div id="main" style="background-image: url(images/tr_background<cfoutput>#bgnum#</cfoutput>.jpg)">
<cfset bgnum = cookie.visitnum></div>