I have an error in the code, tell me what is wrong with the variable?
function setImage(elementId, strImage) { var imageElem = getElement(elementId); if (!imageElem) return; imageElem.src = strImage; } function iSwap(imgID, newImg) { newImgPath = "" + newImg; setImage(imgID, newImgPath); }
The error console swears at this: ReferenceError: getElement is not defined. Error directly in line:
var imageElem = getElement( elementId );
getElement
not defined - Specter