Solved

rolling image

Posted on 2004-09-25
4
891 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
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…

729 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