rachelason
Programmer
HI! can someone help me here.
I am trying to change the image on clicking the image. It's a button which changes colour basically but the two colors are stored as an image.
this is the code
<td align="center">
<a href="viewhouseplan.html" target="edit"
onMouseover="document.vie.src='iconviewhouse2.gif'"
onMouseout="document.vie.src='iconviewhouse.gif'">
<img src="iconviewhouse.gif" name="vie" width="135" height="14" border="0"></a>
</td>
It's a list of menu which displays iconviewhouse.gif in the first place. on placing the mouse over, it displays iconviewhouse2.gif and onmouseout it goes back to the original picture. What i want to do is once the image is clicked it should stay in iconviewhouse2.gif. I tried to write a function i.e.,
function changingImage(imag2,nam){
document.nam.src=imag2;} and called this in href onclick, but it doesn't do a thing. can someone helpme. Thanks in advance.
I am trying to change the image on clicking the image. It's a button which changes colour basically but the two colors are stored as an image.
this is the code
<td align="center">
<a href="viewhouseplan.html" target="edit"
onMouseover="document.vie.src='iconviewhouse2.gif'"
onMouseout="document.vie.src='iconviewhouse.gif'">
<img src="iconviewhouse.gif" name="vie" width="135" height="14" border="0"></a>
</td>
It's a list of menu which displays iconviewhouse.gif in the first place. on placing the mouse over, it displays iconviewhouse2.gif and onmouseout it goes back to the original picture. What i want to do is once the image is clicked it should stay in iconviewhouse2.gif. I tried to write a function i.e.,
function changingImage(imag2,nam){
document.nam.src=imag2;} and called this in href onclick, but it doesn't do a thing. can someone helpme. Thanks in advance.