Jump to content

PHP & Javascript to create a rollover image from multiple links


jonw118

Recommended Posts

I'm hoping someone would be kind enough to help me here. First I want to know if I can accomplish this. If so, I am by no means asking you to write my code, but if you could steer me the direction, or give me some pointers I'd really appreciate!

 

Basically I have a script the shows multiple results on the page pulled from the database.

 

The code for the link:

<a href="full_desc.php?id=<? echo $row['id'];?>"><? echo $row['subject'];?></a>

 

Then, for each link displayed it has a photo that displays:

<? if(!empty($row['thumb'])){?>
<img src="admin/<? echo $row['thumb']?>" width="120" height="60" border="1">
<? }?>

 

Now what I want to do is have one main image, so that when you rollover a link that is populated it changes the photo (associated with that link) in the one main image.

 

I'd really, really appreciate any help at all!

 

Thanks.

Okay this really is more of a HTML/CSS question

 

from the code you have posted you could be able to get this to work, with a little help on the html side.. so here and an example

<A HREF="pages.html" ONMOUSEOVER='rollover.src="overtop.gif"' ONMOUSEOUT='rollover.src="thumb.gif" '>
<IMG SRC="thumb.gif" NAME="rollover" border="0">
</A>

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.