O
OM
Why doesn't a onmouseover function work in a function?
(It's prob due to my code being wrong more than anything else!)
I've got the following code (snippet):
<!-- Begin
var image0 = new Image(); image0.src = "blank.jpg";
var image1 = new Image(); image1.src = "map.jpg";
// End -->
function swapTheImages()
{
image0.src='1.jpg'; image1.src='2.jpg'; image2.src='2.jpg';
}
When I do an onmouseover and call the function, it doesn't work.
BUT if I put the code in directly - it works!
Why is this?
I'm pulling my hair out.
Any help would be appreciated.
OM
(It's prob due to my code being wrong more than anything else!)
I've got the following code (snippet):
<!-- Begin
var image0 = new Image(); image0.src = "blank.jpg";
var image1 = new Image(); image1.src = "map.jpg";
// End -->
function swapTheImages()
{
image0.src='1.jpg'; image1.src='2.jpg'; image2.src='2.jpg';
}
When I do an onmouseover and call the function, it doesn't work.
BUT if I put the code in directly - it works!
Why is this?
I'm pulling my hair out.
Any help would be appreciated.
OM