Solved

Ad Rotator

Posted on 2001-09-10
7
653 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 50 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

828 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