Why doesn’t this piece of code swap images on mouse-over as intended?:
<a href="#" onMouseOver="
if (document.the_image.src == '01.jpg')
{
document.the_image.src = '02.jpg';
}
else if (document.the_image.src == '02.jpg')
{
document.the_image.src = '03.jpg';
}
else
{
document.the_image.src = '01.jpg';
}
">
Some image</a><br>
Most likely in the rendered HTML, the image source is an absolute URL, so the src is probably “http://mydomain.com/01.jpg“
To test this, try setting an alert() in your code to see what the actual src value is
You should probably also put that code in a function, that’s a lot of javascript to put in inline HTML.