Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Is there a way to automatically change photos?
Old 09-19-2008, 06:23 AM Is there a way to automatically change photos?
Experienced Talker

Posts: 46
Name: Jethro Williams
Trades: 0
I was wondering if it was possible to have photos on a page, automatically change to a different photo, say every 5 seconds, to add a bit of variety to a page... but I have no idea where to start. Can anyone help?
__________________

Please login or register to view this content. Registration is FREE
jrosworld.com is offline
Reply With Quote
View Public Profile Visit jrosworld.com's homepage!
 
 
Register now for full access!
Old 09-19-2008, 06:42 AM Re: Is there a way to automatically change photos?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,524
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
search the javascript forum (where this thread will be) for slideshow scripts.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-19-2008, 03:12 PM Re: Is there a way to automatically change photos?
nyef's Avatar
Ultra Talker

Posts: 265
Name: Lucas
Trades: 0
<img id="theimage" src="image0.jpg" />
<script type="text/javascript">
var imagearray=['image0.jpg','image1.jpg','image2.jpg'];
var currentimage=0;
function rotateImages() {
currentimage++;
if (currentimage>=imagearray.length) currentimage=0;
document.getElementById('theimage').src=imagearray[currentimage];
}
window.setInterval("rotateImages()",5000);
</script>
__________________
~nyef

Please login or register to view this content. Registration is FREE

Last edited by nyef; 09-19-2008 at 03:13 PM..
nyef is offline
Reply With Quote
View Public Profile Visit nyef's homepage!
 
Reply     « Reply to Is there a way to automatically change photos?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.42933 seconds with 12 queries