?
Solved

rolling image

Posted on 2004-09-25
4
Medium Priority
?
898 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

Automating Terraform w Jenkins & AWS CodeCommit

How to configure Jenkins and CodeCommit to allow users to easily create and destroy infrastructure using Terraform code.

Question has a verified solution.

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

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
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…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

771 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