Solved

Ad Rotator

Posted on 2001-09-10
7
650 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn 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…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now