Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image Rotation

Status
Not open for further replies.

kmcreative

Technical User
Sep 26, 2007
18
GB
Hi There

I wonder if anyone can help point me to a tutorial/plugin/extension that shows how to do the following.

In Dreamweaver I want to have an image as a banner on the home page. However each time you go to the home page the image changes to something else, like this site...

If you go to the home page, then click on another page and then click your back button to the home page the image changes.

Hope someone can help

Thanks in advance

Regards...Stu

Kmcreative
 
Should be simple enough, but the exact method will depend on what server side language you have available to you.

Basically it comes down to having your selection of images in a folder, and then having ASP, or PHP or whichever server side language you use, randomly pick one to show when the page loads.


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
In the example given above, they are using JavaScript to rotate the backgrounds.
The call to the function is easily found if you use 'View Source' on their page.
Code:
<script type="text/javascript" language="javascript">
rotatebg('title', 17, [
	{img:'/media/item/72251/1496/DMU_homepage_15_birdlandbirdhouse.jpg', left:0, top:0, width:902, height:635},{img:'/media/item/72252/1496/DMU_homepage_10_fantasyshoes.jpg', left:0, top:0, width:1024, height:341},{img:'/media/item/72253/1496/DMU_homepage_11_selfstorage.jpg', left:0, top:0, width:902, height:334},{img:'/media/item/72254/1496/DMU_homepage_14_citroends.jpg', left:0, top:0, width:646, height:336},{img:'/media/item/72255/1496/DMU_homepage_17_onelinecat.jpg', left:0, top:0, width:840, height:334},{img:'/media/item/72257/1496/DMU_homepage_15_9091kettle.jpg', left:0, top:0, width:688, height:341},{img:'/media/item/72258/1496/DMU_homepage_13_mesa.jpg', left:0, top:0, width:791, height:340},{img:'/media/item/72259/1496/DMU_homepage_09_petitfleur.jpg', left:0, top:0, width:687, height:323},{img:'/media/item/72260/1496/DMU_homepage_12_armchaircite.jpg', left:0, top:0, width:890, height:341},{img:'/media/item/72261/1496/DMU_homepage_08_radiator.jpg', left:0, top:0, width:794, height:341},{img:'/media/item/72262/1496/DMU_homepage_07_renaultr26.jpg', left:0, top:0, width:836, height:329},{img:'/media/item/72263/1496/DMU_homepage_16_k2phonekiosk.jpg', left:0, top:0, width:670, height:327},{img:'/media/item/73771/1496/DMU_homepage_01_hangitall.jpg', left:0, top:0, width:764, height:341},{img:'/media/item/73772/1496/DMU_homepage_02_olpc.jpg', left:0, top:0, width:687, height:341},{img:'/media/item/73773/1496/DMU_homepage_04_pompidou.jpg', left:0, top:0, width:827, height:324},{img:'/media/item/73774/1496/DMU_homepage_05_chairone.jpg', left:0, top:0, width:681, height:341},{img:'/media/item/73775/1496/DMU_homepage_06_mex-x.jpg', left:0, top:0, width:851, height:324},
]);
</script>
The function itself is probably a scriptaculous funtion (or is found in one of the may js includes found on the page).

Greg
People demand freedom of speech as a compensation for the freedom of thought which they seldom use. Kierkegaard
 
one of the *many* includes

Greg
People demand freedom of speech as a compensation for the freedom of thought which they seldom use. Kierkegaard
 
Thanks both for your responses. I'm only new to dreamweaver and don't really know much about coding (PHP etc) but will see if I can figure out. I was hoping there might just be a plugin/extension or simple select option in dreamweaver itself.

Found this great extension for image gallery which is so simple and works a treat...


Thanks again

Kmcreative
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top