C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » Images »

Random Image selector after 1 minute


Posted Date: 04 Jun 2008    Resource Type: Code Snippets    Category: Images
Author: suhati guptaMember Level: Silver    
Rating: 1 out of 5Points: 10



This code will change image after some time automatically

<script type="text/javascript">
var c=0
var s
function changeImage()
{
if (c%5==0){
document.getElementById('img').src = "images/7.jpg";
}
if (c%5==1){
document.getElementById('img').src = "images/5.jpg";
}
if (c%5==2){
document.getElementById('img').src = "images/11.jpg";
}
if (c%5==3){
document.getElementById('img').src = "images/2.jpg";
}
if (c%5==4){
document.getElementById('imgphoto-gallery').src = "images/3.jpg";
}
c=c+1
s=setTimeout("changeImage()",2000)
}
</script>
call this function on load
<body onLoad="changeImage()">




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Save Images to a Table using VB.NET
Previous Resource: Convert an Image to Icon
Return to Discussion Resource Index
Post New Resource
Category: Images


Post resources and earn money!
 
Related Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use