:: Forum >> Version 2 >>

Rollover-image in a table?!?

Hi!
I'm using this rollover funtion:

<!--
image1= new Image; image1.src="image.gif";
image2= new Image; image2.src="image.gif";

function rollover(imagename, newsrc)
{
document.images[imagename].src=newsrc.src
}

//-->

And when I try to use it on a picture that is in a table, It wont work, it works everywhere else, but not in a table..

Any tips? is this not a good way to do this? is there any other functions that works better?

Please help!
Martin Zazinow
Monday, February 13, 2006
And this is what I put on the link/image

<a href="index.htm" target=""
onMouseOver="rollover('image', image2)"
onMouseOut="rollover('image', image1)">
<img src="image1.jpg"></a>
Martin Zazinow
Monday, February 13, 2006
I believe you may need to add the name/id of the image to make that code work. You also may want to re-think your logic seems a little off. After you mouseover, your mouseout will have the same image.

<img src="image1.jpg" id="image" name="image"></a>
Tony (www.FriendsOfAW.com)
Tuesday, February 14, 2006
omg LOL! I just wrote the code too fast, SORRY!!!! just wanted to show what kind of script I used!!!!
Martin Zazinow
Saturday, February 18, 2006



This topic is archived.

Back to support forum

Forum search