I'm new to javascript, my script is designed to display either one image or the other image with a 50/50 chance. It worked in safari but not in firefox, this cuts out too many customers for the website I'm designing for.
Any help would be appreciated, especially if anyone could say how to make sure it would work across all browsers. Otherwise I can figure out how to make it ignore it in firefox or some other such combination.
var randomnumber=Math.floor(Math.random()*2)
if (randomnumber > 0)
{
document.write("<img src="Easter.jpg">");
}
else
{
document.write("<img src="StPatrick.jpg">");
}
Oh and the actual code has & q u o t ; instead of " where it needs to be in case you were wondering if that was making it not work. It does work in safari - just not in firefox or camino.