Solved

rolling image

Posted on 2004-09-25
4
887 Views
Last Modified: 2012-06-27
Hi,
I need a js that would change 2 or 3 images based on time (seconds).  More like a banner or so.
0
Comment
Question by:omanca
4 Comments
 
LVL 2

Author Comment

by:omanca
ID: 12149637
ok, I found an answer from google search.  I closed the site and forgot the address.  Here it is anyway

<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()*banners.length);
      }
      old = current;
      document.images['banner'].src = banners[current];
      setTimeout('init()',2000);
}

function sendPage()
{
      location.href = linx[current];
}
</script>
</head>

<body onload="init()">
<a href="javascript:sendpage()"><img
      src="1.gif" name="banner"
      width=100 height=18 border=0></a>
</body>
</html>
0
 
LVL 1

Expert Comment

by:srini5474
ID: 12150045
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
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12554196
PAQed with points refunded (50)

modulo
Community Support Moderator
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Problem to be resolved in this article Currently, development of website and web application can be done without writing thousands of lines of programming code by hand. Description This can be done through by using a open source framework such …
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now