So I have this javascript randomizing between 3 images on my homepage. It works everywhere except MAC IE5. I can see the image for a split second then it goes to white (background color). I’d love it if it would work in all browsers and I know IE MAC isn’t used much at all but it still would be nice if anybody had some help.
[CODE] <script language=”javascript”>
var backgroundSrcs = new Array(“images/home_bg_01.jpg”,”images/home_bg_02.jpg”,”images/home_bg_03.jpg”)
function random()
{
var bgimage=backgroundSrcs[(Math.round(Math.random()*(backgroundSrcs.length-1)))]
document.getElementById(“homeimage”).style.background = “url(‘” + bgimage + “‘)”;
}
</script>
this does the randomizing when refreshed.
[CODE]<body onload=”random()”>
my css for the image.
[CODE] #homeimage {
margin: 29px 0px 0px 0px;
width: 238px;
height: 308px;
float:left;
background-image: url(../images/home_bg_01.jpg) no-repeat;
background-color:#ffffff;
}