This is an example of how to dynamically display banners using JavaScript.
There are two parts to this method:
Write a meta tag as below:
<meta http-equiv="refresh" content="10">
This means that the page will refresh every 10 seconds. You may change the value "10"
to any number.
2. Using getSeconds() method:
In JavaScript, the seconds are set as 0 - 59. You can divide this up as
as you want. In this sample we divide the seconds into 6 sections:
0 - 9
10 - 19
20 - 29
30 - 39
40 - 49
50 - 59
We apply document.write to write a banner:
if ((ss>=30)&&(ss<=39))
document.write("<img src='BanC1line.gif' border='0'>")
In total we write 6 banners each different time slot within a single minute, and
link the banners to different URL so the banners automatically change every
10 seconds. When the client clicks a banner they will be taken to the advertisers web site.
You can change the method. For example, use GetHours() to set different image or
text files display in
different hours. To learn more about JavaScript, you can go to
JavaScript For Beginners.
i saw one example in Create Dynamic Banners By Using JavaScript in your site. is it possible to get the image,url and tooltip from table using asp (sql server). if it is possible explain me in detail.
OK, this is really starting to annoy me, someone put a <meta http-equiv="refresh" content="10"> in the html source for this page. The 10 second refresh has got to stop.