Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script not working only in IE

Status
Not open for further replies.

theyod

Technical User
Mar 6, 2003
3
hello people much smarter than me :) this script works great in every browser but IE, any suggestions? tyia.


<a href="website.com/page.html" target="_blank">
<!-- <img src="pressLink.jpg" width="300" height="133" border="0"> -->

<img src="" name="Rotating" id="Rotating1" width="300" height="133">
<!-- <img src="" name="Rotating" id="Rotating2" width="100" height="100"> -->


<script language="JavaScript">
var ImageArr1 = new Array("pressLink.jpg","pressLink2.jpg","pressLink3.jpg","pressLink4.jpg","pressLink5.jpg");
var ImageHolder1 = document.getElementById('Rotating1');
<!--

var ImageArr2 = new Array("Picture(5).jpg","Picture(6).jpg","Picture(7).jpg");
var ImageHolder2 = document.getElementById('Rotating2');
-->
function RotateImages(whichHolder,Start)
{
var a = eval("ImageArr"+whichHolder);
var b = eval("ImageHolder"+whichHolder);
if(Start>=a.length)
Start=0;
b.src = a[Start];
window.setTimeout("RotateImages("+whichHolder+","+(Start+1)+")",2500);
}

RotateImages(1,0);
RotateImages(2,0);
</script>

</a>
 
does it work if you take the entire script out of the anchor element? And/or removing the HTML comments from inside the script element?

none of these should really matter but hey! it is Infernet Exploder after all.

Also are there any errors showing up? (press F12 for the developer tools)

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top