Forums

This topic is locked

Rollover images

Posted 10 Apr 2007 17:18:03
1
has voted
10 Apr 2007 17:18:03 Kip Guerrero posted:
I have searched the forum (and many others) and I have not found the same issue (or one that I could "leap frog". The closest topic was "Rollover images don't work on repeat regions" But it was inconclusive. So, if it's out there please point me in the right direction.

I have a series of buttons that are generated (i.e. last 5 users - all show the same buttons).

The initial graphics/buttons show up correctly. The first listed user's button function (with respect to mouse rollover) correctly.

However, when I am on the second -> fifth user icons, the first users icons change.

I suspect that this is due to the fact that I have assigned the img name discretely instead of via an array:
<a href="{$baseurl}/something.php?UID={$5users[i].UID}" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Videos','','images/vidicon_f2.gif',1)"><img src="images/vidicon.gif" alt="Videos" name="image16" border="0" id="Videos" width="48" height="30"/></a>

Via experiment I can tell that the first image named "image16" will display the alternate image.

So, it seems to me that the issue is associated to the fact that I am never changing my image name when I am associating the button. The button destinations are changing via scripting.

If this is correct I am struggling to find the correct syntax to use so that I may have the img name = an array based value. Something like name = image16[i]

Any feedback would be appreciated.

Thanks,
Kip

Reply to this topic