View Single Post
Old 01-02-2009, 05:37 AM   PM User | #1
Joemoemofo
New Coder

 
Join Date: Jan 2009
Posts: 33
Thanks: 6
Thanked 0 Times in 0 Posts
Joemoemofo is an unknown quantity at this point
NumberOfImagesToRotate Question

Code:
<script type="text/javascript" language="JavaScript">
<!-- Copyright 2002 Bontrager Connection, LLC
//
// Type the number of images you are rotating.

NumberOfImagesToRotate = 2;

// Specify the first and last part of the image tag. 

FirstPart = '<img src="images/ads/side';
LastPart = '.jpg" height="151" width="222">';

function printImage() {
var r = Math.ceil(Math.random() * NumberOfImagesToRotate);
document.write(FirstPart + r + LastPart);
}
//-->
</script>
Okay, I have this to rotate advertisement images for me. However, I want to add a seperate URL to each image that I have. How would I go about doing that?
Joemoemofo is offline   Reply With Quote