Dear All,
How to change 4 images after 2 seconds?
see the example :- http://freekaamaal.com/ in the featured deals section.
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Riddhi ValechaRank #794 · 2.9K reputationPosted May 21, 2013, 3:08 AM EDT
Use Timer Control...
Set its interval to 2 seconds.....
After every 2 seconds, it will call the method to change the image.
If you have the project, can you share it?? It will be easy to make changes there itself...
Sandeep Singh ShekhawatRank #147 · 15.6K reputationPosted May 21, 2013, 3:20 AM EDT
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>title>
<script type="text/javascript" language="javascript">
window.onload = function ()
{
var rotator = document.getElementById("rotator");
var images = rotator.getElementsByTagName("img");
for (var i = 1; i < images.length; i++)
{
images[i].style.display = "none";
}
var counter = 1;
setInterval(function ()
{
for (var i = 0; i < images.length; i++)
{
images[i].style.display = "none";
}
images[counter].style.display = "block";
counter++;
if (counter == images.length)
{
counter = 0;
}
}, 2000);
};
script>
head>
<body>
<form id="form1">
<div id="rotator">
<img alt="" src="http://www.aspsnippets.com/images/Blue/Logo.png" />
<img alt="" src="http://jqueryfaqs.com/images/Blue/Logo.png" />
<img alt="" src="http://www.aspforums.net/images/blue/Logo.png" />
div>
form>
body>
html>
Jagatpal SinghRank #1,947 · 751 reputationPosted May 21, 2013, 3:34 AM EDT
Shankar MRank #874 · 2.5K reputationPosted May 21, 2013, 3:41 AM EDT
Hope this link might help you..
http://csharp-slackers.blogspot.com/search/label/Animated%20Tray%20Icon%20in%20C%23
Thanks, Shankar M
Jagatpal SinghRank #1,947 · 751 reputationPosted May 21, 2013, 3:44 AM EDT
Sandeep Singh ShekhawatRank #147 · 15.6K reputationPosted May 21, 2013, 3:44 AM EDT
So can you please expalin in detail that what you want and how?
Jagatpal SinghRank #1,947 · 751 reputationPosted May 21, 2013, 3:49 AM EDT
Pankaj PandeyRank #642 · 3.7K reputationPosted May 21, 2013, 5:00 AM EDT
Follow these links.
http://www.c-sharpcorner.com/Blogs/11160/change-picture-in-adrotator-without-refreshing-page.aspx
you can get image from database and convert it into xml .
Mark as answered if usefull