Banner Ads

J

Jennifer

I'm inserting a rotating banner into my site. Am I able to link each
seperate picture to a seperate URL? It seems that I'm only able to link all
of the pictures to one URL ??
Thanks!
 
T

Trevor Lawrence

Jennifer said:
I'm inserting a rotating banner into my site. Am I able to link each
seperate picture to a seperate URL? It seems that I'm only able to link
all
of the pictures to one URL ??
Thanks!

Would this do the job ?

The only problem I noticed is that when the image changes, you have to move
the mouse to get the new URL to appear in the status bar

<html>
<head>
<script type="text/javascript">
// Set up the image files to be used.
var theImages = new Array() // do not change this
// Set up the URL names to be used.
var theURLs = new Array() // do not change this

// To add more image files and URLs, continue with the
// pattern below, adding to the arrays.
theImages[0] = 'images/1.jpg'
theImages[1] = 'images/2.jpg'
theImages[2] = 'images/3.jpg'
theImages[3] = 'images/4.jpg'

theURLs[0] = 'fred.com'
theURLs[1] = 'nerk.com'
theURLs[2] = 'joe.com'
theURLs[3] = 'blow.com'

// delay between rotating images (in seconds)
var interval = 2.5
interval *= 1000

// do not edit anything below this line
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
preBuffer = new Image()
preBuffer.src = theImages
}
function showImage(){
var whichImage = Math.round(Math.random()*(p-1))
document.getElementById("place").innerHTML = '<a href="' +
theURLs[whichImage]+ '"><img src="' +theImages[whichImage] +'"></a>'
setTimeout("showImage()", interval)
}
</script>
</head>
<body onload="showImage()">
<div id="place"></div>
</body>
</html>
 
R

Ronx

The FrontPage Banner Add component is a Java applet that will only be
seen on PCs that have a Java Virtual Machine installed and enabled.
Many (perhaps most) users do not have a JVM and will only see a grey box
instead of the images. And as you have seen, the ad rotator is limited
to just one URL. For these reasons the Banner Ad component (and any
components that rely on Java, such as Hover Buttons) is best avoided.

Do not confuse Java with JavaScript. Trevor's version is JavaScript.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top