Javascript for changing image every 2 seconds

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Nov 2008
Posts: 1
Reputation: manaraghu is an unknown quantity at this point 
Solved Threads: 0
manaraghu manaraghu is offline Offline
Newbie Poster

Javascript for changing image every 2 seconds

 
0
  #1
Nov 20th, 2008
Javascript for changing image of image tag every 2 seconds
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 167
Reputation: Drew is an unknown quantity at this point 
Solved Threads: 7
Drew's Avatar
Drew Drew is offline Offline
Junior Poster

Re: Javascript for changing image every 2 seconds

 
0
  #2
Nov 20th, 2008
You know google has TONS of examples of how to do this, but here is something i wrote really fast.

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. setInterval(function() {
  2. document.getElementById('ImageID').src='imagepath?rd=' + new Date()
  3. }, 2000)
Drew Gauderman
ASP / MSSQL Coder
http://www.iportalx.net - My ASP Portal
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC