views:

86

answers:

1

I have an external javascript that contains:

function random_imglink(){  
var myimages=new Array()  
myimages[1]="http://sevir.sitegoz.com/jchs/Banner1.png"
myimages[2]="http://sevir.sitegoz.com/jchs/banner2.png"
myimages[3]="http://sevir.sitegoz.com/jchs/banner3.png"
myimages[4]="http://sevir.sitegoz.com/jchs/banner4.png"
myimages[5]="http://sevir.sitegoz.com/jchs/banner5.png"
myimages[6]="http://sevir.sitegoz.com/jchs/banner6.png"

var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<img src="'+myimages[ry]+'" border=0>')
}

And my html contains:

<script language="JavaScript">
<!--
random_imglink()
//-->
</script>

But only the first image loads.
My site is here, the banner is supposed to change every time any of the pages loads (or reloads) but only the first image shows up, any ideas?

+2  A: 

Apache servers are case sensitive. You have "Banner1" capitalized, but none of the other banners. When I try to navigate to the other images (with a lower case 'b'), I am redirected to the hosting site - telling me the file names do not exist.

This may not be why you aren't getting the other images, but it certainly isn't helping.

Rob Allen
looks like this is the problem as the img url changes every time I try and load the page, but the image is missing, capitalising the B make the url work ok
Re0sless
I didn't even see that, thanks bud
Sevir