html timer for several website addresses

Associate
Joined
1 Dec 2002
Posts
1,083
Location
Portrush, N.Ireland
hi there,
my apologies if the title isnt immediately obvious but this is what i'm trying to find out:
i have html code to put a banner onto my website which when clicked on leads to my other web portal.
There are several people who "inhabit" my website and would like it that when the banner is clicked on it goes to their portal aswell. Is it possible to put code into the html so that all our web portal addresses cycle through on a mer?
so you could click on the banner which sends the person to my portal then after a certain time when its clicked again it goes to someone elses?
i know nothing about html (all cut and paste work for me!)
any help greatly appreciated
regards,
steve.
 
If you didn't want the timer, the following script would just pick a random link from the selection everytime a user visits or reloads the page.

PHP:
<script language="javascript">
<!--

link = new Array();
image = "<img src='myimage.gif' />";

link[0] = "<a href = 'http://www.site0.com'>"+image+"</a>";
link[1] = "<a href = 'http://www.site1.com'>"+image+"</a>";
link[2] = "<a href = 'http://www.site2.com'>"+image+"</a>";
link[3] = "<a href = 'http://www.site3.com'>"+image+"</a>";
link[4] = "<a href = 'http://www.site4.com'>"+image+"</a>";
link[5] = "<a href = 'http://www.site5.com'>"+image+"</a>";

num = Math.floor(Math.random() * link.length);
document.write(link[num]);

//-->
</script>
 
Back
Top Bottom