HighDots Forums  

swap image

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss swap image in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dfnnospam
 
Posts: n/a

Default swap image - 11-11-2004 , 04:49 PM






Hi group,
Is there an extension that will load a different image in an individual
frame each time a page reloads?


David

Thanks in advance to all those that take the time to reply



Reply With Quote
  #2  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: swap image - 11-11-2004 , 06:31 PM






Yes. Don't use frames.

Try this -

Put this in the head of the document -

function displayRandomImage(imageName,array){
document.images[imageName].src=array[new Date().getTime()%array.length];
}
urls=["images/cs1.jpg","images/cs2.jpg","images/cs3.jpg","images/cs4.jpg"]
// load this line with your image names and paths

and then put this in the body of the page -

<body onLoad="displayRandomImage('csmember',urls)">
<!-- csmember is the NAME of the image receiving the random changes -->

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"dfnnospam" <dfnnospam (AT) eircom (DOT) net> wrote

Quote:
Hi group,
Is there an extension that will load a different image in an individual
frame each time a page reloads?


David

Thanks in advance to all those that take the time to reply




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.