Ad Rotator

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
mamba100Asked:
Who is Participating?
 
daveamourConnect With a Mentor Commented:
You will need to use Javascript to achieve this

Use the setTimeout to change an image at a predetermined time period
0
 
daveamourCommented:
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
 
daveamourCommented:
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
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
mamba100Author Commented:
Thanks
The question here is  will this cause the whole page to flicker whenever it refreshes?
0
 
daveamourCommented:
No, it wont refresh the whole page, just the image
0
 
mamba100Author Commented:
Thanks
The question here is  will this cause the whole page to flicker whenever it refreshes?
0
 
mamba100Author Commented:
Thanks
The question here is  will this cause the whole page to flicker whenever it refreshes?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.