Could anyone help spot the problem witht he code below, i have put in bold the line i think has the problem but im not 100% sure <script language="JavaScript1.2"> var howOften = 7; //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(); [B]items[0]="<a href='http://.co.uk/view_room.php?id=43'><img src='http://.co.uk/photos/43-1-1221452071.jpg' width="120' height='100' border='0'> The G, Mer</a>";[/B] items[1]="<a href='http://.co.uk/view_room.php?id=43'><img src='http://.co.uk/photos/43-1-1221452071.jpg' width="120' height='100' border='0'> The y, Mncer</a>"; 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) ? 0 : current + 1; //increment or reset setTimeout("rotater()",howOften*1000); } window.onload=rotater; //–> </script> Code (markup):
I guess, this is missing somewhere in <BODY> <div id="placeholderdiv"></div> btw. maybe you need also set some dimensions : <div id="placeholderdiv" style="width:120px;height:120px;border:1px solid black;"></div>
hmm, maybe the size could be better placed in div instead of each picture. I didnt think of that. Thanks for the suggestion +rep to everyone on this thread