Hey all
I designed a site for a friend. Got some javascript running om the home page thats supposed to rotate 6 images. Offline it works great but as I upload it it only shows the container with alt. I can see it rotate but there are no images in the block. http://www.phoboslamps.co.za/
Head code:
<script type="text/javascript">
var howOften = 2; //number often in seconds to rotate
var current = 0; //start the counter at 0
var ns6 = document.getElementById&&!document.all; //detect netscape 6
// place your images, text, etc in the array elements here
var items = new Array();
items[0]="<a href='quote.html' ><img alt='image1' src='lamp1.gif' height='200' width='200' border='0' /></a>"; //a linked image
items[1]="<a href='quote.html' ><img alt='image2' src='lamp2.gif' height='200' width='200' border='0' /></a>"; //a linked image
items[2]="<a href='quote.html' ><img alt='image3' src='lamp3.gif' height='200' width='200' border='0' /></a>"; //a linked image
items[3]="<a href='quote.html' ><img alt='image4' src='lamp4.gif' height='200' width='200' border='0' /></a>"; //a linked image
items[4]="<a href='quote.html' ><img alt='image5' src='lamp5.gif' height='200' width='200' border='0' /></a>"; //a linked image
items[5]="<a href='quote.html' ><img alt='image6' src='lamp6.gif' height='200' width='200' border='0' /></a>"; //a linked image
function rotater() {
document.getElementById("placeholder").innerHTML = items[current];
current = (current==items.length-1) ? 0 : current + 1;
setTimeout("rotater()",howOften*1000);
}
function rotater() {
if(document.layers) {
document.placeholderlayer.document.write(items[current]);
document.placeholderlayer.document.close();
}
if(ns6)document.getElementById("placeholderdiv").innerHTML=items[current]
if(document.all)
placeholderdiv.innerHTML=items[current];
current = (current==items.length-1) ? 0 : current + 1; //increment or reset
setTimeout("rotater()",howOften*1000);
}
window.onload=rotater;
//-->
</script>
The body code is inside a div with its own ID
<div id="sidebar2">
<layer id="placeholderlayer"></layer><div id="placeholderdiv"></div>
</div>
The site I designed myself but the javascript I copied from google. I have tried everything I can find online and even read some info here but cant seem to fix my problem.
Any ideas/tips will be highly appreciated