Solved

Ad Rotator

Posted on 2001-09-10
7
652 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Determining if Request.Form is empty 1 47
JQuery Date Time picker not showing 29 129
Recordset containing single quotes 8 35
Hide cell in a table 2 10
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

776 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