omanca
asked on
rolling image
Hi,
I need a js that would change 2 or 3 images based on time (seconds). More like a banner or so.
I need a js that would change 2 or 3 images based on time (seconds). More like a banner or so.
i rather suggest u to use ADRotator unction in this case, i think this link would help u how to use ADRotator Effeciently
http://www.w3schools.com/aspnet/control_adrotator.asp
Regards,
Srinivasan S
http://www.w3schools.com/aspnet/control_adrotator.asp
Regards,
Srinivasan S
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
<html>
<head>
<script>
var banners = new Array(
'1.gif',
'2.gif');
var linx = new Array(
'intro.html',
'intro.html');
var old = 0;
var current = 0;
function init()
{
if (!document.images) return
while (current == old)
{
current = Math.floor(Math.random()*b
}
old = current;
document.images['banner'].
setTimeout('init()',2000);
}
function sendPage()
{
location.href = linx[current];
}
</script>
</head>
<body onload="init()">
<a href="javascript:sendpage(
src="1.gif" name="banner"
width=100 height=18 border=0></a>
</body>
</html>