Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Ad Rotator

Posted on 2001-09-10
7
Medium Priority
?
658 Views
Last Modified: 2008-04-03
Hi,
 I would like to know how to make an ad rotator whereby the ad keeps rotating every couple of seconds.i tried the ad rotator component but what is happening is that the ad rotates whenever you visit the page the next time.It does not happen automatically as it does on some websites that i have visited.Can someone tell me how i can achieve this.
Thanks
0
Comment
Question by:mamba100
  • 4
  • 3
7 Comments
 
LVL 19

Accepted Solution

by:
daveamour earned 200 total points
ID: 6469980
You will need to use Javascript to achieve this

Use the setTimeout to change an image at a predetermined time period
0
 
LVL 19

Expert Comment

by:daveamour
ID: 6469990
Here is enough code to get you started, you will just need to add code to decide how you want the image source to be changed.

You will also need to change the link as well.

Dave
0
 
LVL 19

Expert Comment

by:daveamour
ID: 6469992
Oops heres the code

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>

<Script Language="JavaScript">
<!--
  function changeImage()
  {
    document.images[0].src = "http://www.experts-exchange.com/images/topleft.gif";
    setTimeout('changeImage()','3000');  
  }
//-->
</Script>

</head>

<body onLoad="setTimeout('changeImage()','3000');">

<Img Src="http://www.experts-exchange.com/images/banner.gif" Name="Banner">

</body>

</html>

Dave
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:mamba100
ID: 6470019
Thanks
The question here is  will this cause the whole page to flicker whenever it refreshes?
0
 
LVL 19

Expert Comment

by:daveamour
ID: 6470027
No, it wont refresh the whole page, just the image
0
 

Author Comment

by:mamba100
ID: 6470069
Thanks
The question here is  will this cause the whole page to flicker whenever it refreshes?
0
 

Author Comment

by:mamba100
ID: 6470072
Thanks
The question here is  will this cause the whole page to flicker whenever it refreshes?
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

963 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