if (imageSrc == "/images/tickred.jpg") {
document.getElementById('ToDo2').setAttribute("src", "/Images/tickGreen.png");
}
if (imageSrc == "/images/tickgreen.png") {
document.getElementById('ToDo2').setAttribute("src", "/Images/tickRed.jpg");
}
}
I know one image is a jpg and one a png.
JavaScriptAJAX
Last Comment
Ovid Burke
8/22/2022 - Mon
Member_2_4694817
Check spelling: tickred.jpg or tickRed.jpg? tickgreen.png or tickGreen.png?
DColin
ASKER
Hi thehagman,
Changed everything to lower case and it is still doing the same. Image toggles for the first time only. I have change the images around and it does not matter which one is displayed first. It toggles once only.