Hi All,
I'm new to JavaScript and am creating a web page for my wife. I've built the basic page and it has 8 buttons near the top on a horizontal menubar. Each button is an image and when the user clicks on one button I want the image to change. But if the user clicks on another button in the menubar, I want the first button to change back to its original image and the second button to change image. This behaviour will let the user know which section of the site they are in.
Can anyone please help me achieve this??
I've tried using the following:
document.getElementById(srcwindow).src = newImage;
and this works but I can't get the image to change back if the user clicks another button.
Please help...
I'm new to JavaScript and am creating a web page for my wife. I've built the basic page and it has 8 buttons near the top on a horizontal menubar. Each button is an image and when the user clicks on one button I want the image to change. But if the user clicks on another button in the menubar, I want the first button to change back to its original image and the second button to change image. This behaviour will let the user know which section of the site they are in.
Can anyone please help me achieve this??
I've tried using the following:
document.getElementById(srcwindow).src = newImage;
and this works but I can't get the image to change back if the user clicks another button.
Please help...