•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 425,895 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,932 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 599 | Replies: 2 | Solved
![]() |
•
•
Join Date: May 2008
Location: Hyderabad, India
Posts: 261
Reputation:
Rep Power: 0
Solved Threads: 30
Hi, everybody,
How to change the images after every 5 seconds in html??????
The images should display in the same places for every 5 seconds?????
can anybody send me code please....
i posted this thread in HTML forum somebody told me that post here so please help anybody
And Advanced thanks...
How to change the images after every 5 seconds in html??????
The images should display in the same places for every 5 seconds?????
can anybody send me code please....
i posted this thread in HTML forum somebody told me that post here so please help anybody
And Advanced thanks...
Thanx,
Sreekanth
www.saap.in
if you problem solved add me as a reputation and mark it mark as solved
Sreekanth
www.saap.in
if you problem solved add me as a reputation and mark it mark as solved
•
•
Join Date: Jun 2008
Location: Phoenix, AZ
Posts: 770
Reputation:
Rep Power: 2
Solved Threads: 63
This will give you the basic functionality:
javascript Syntax (Toggle Plain Text)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script language="javascript" type="text/javascript"> var timerid = 0; var images = new Array( "image1.jpg", "image2.jpg", "image3.jpg"); var countimages = 0; function startTime() { if(timerid) { timerid = 0; } var tDate = new Date(); if(countimages == images.length) { countimages = 0; } if(tDate.getSeconds() % 5 == 0) { document.getElementById("img1").src = images[countimages]; } countimages++; timerid = setTimeout("startTime()", 1000); } </script> </head> <body onload="startTime();"> <img id="img1" src="image3.jpg" /> </body> </html>
Last edited by R0bb0b : Jun 26th, 2008 at 5:34 am.
•
•
Join Date: May 2008
Location: Hyderabad, India
Posts: 261
Reputation:
Rep Power: 0
Solved Threads: 30
Thanks very much i added your reputation
Thanx,
Sreekanth
www.saap.in
if you problem solved add me as a reputation and mark it mark as solved
Sreekanth
www.saap.in
if you problem solved add me as a reputation and mark it mark as solved
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Adding text to Slideshow script for images (JavaScript / DHTML / AJAX)
- random images (PHP)
- need help changing background color of an iframe (JavaScript / DHTML / AJAX)
- setTimeout prevents resetting of image (JavaScript / DHTML / AJAX)
- Changing background images in frames (Java)
- Changing site over to ASP - what SE effects will I notice? (Search Engine Optimization)
- changing the color of a HTML form selection (HTML and CSS)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: how to give links to images
- Next Thread: Dynamic menu with XML


Linear Mode