I'm trying to change an image in JavaScript+Prototype by changing the "src" attribute of the element. It works fine in IE, but not in Firefox. I don't get any errors and the script continues executing after this bit executes:
var image = $('toggle');
image.setAttribute("src", "../images/icons/icon_minus.gif");
image.setAttribute("alt", "Minus Symbol");
image.setAttribute("title", "Collapse tree");
What am I doing wrong? How do I make the browser replace the existing image "icon_plus.gif" with "icon_minus.gif"? I'm sure it must be something really obvious but I can't figure out what!
Thanks