Click to See Complete Forum and Search --> : change 2 pictures with OnMouseOver


vinnih
09-21-2004, 07:20 AM
Hello,

i am trying to write a script tha changes 2 different pictures when i position the mouse over one of them, wich is a link to another page.

i found a script that changes a picture when you point at it and i modyfied it. Now when i point at the picture that is a link, the other one change exactly as i want but the one taht i point at doesn't chage and i don't know how to make it.

Please help.

chriz
09-21-2004, 09:20 AM
something like this?


<img src="image1.gif" name="img1">
<br>
<img src="image2.gif" name="img2">
<a href="URL" onMouseover="in()" onMouseout="out()">THE LINK</a>
<script language="javascript">
function in(){
document.img1.src = "image3.gif";
document.img2.src = "image4.gif";
}
function out(){
document.img1.src = "image1.gif";
document.img2.src = "image2.gif";
}
</script>


Make sure you change th eimage URLs to the images you have on ur site

vinnih
09-21-2004, 02:23 PM
Thank you very much Chriz.
I still can't make it work, but i'll keep trying till it is done.

Thank you again.