PDA

View Full Version : Picture displays when mouse is over hyperlink


lmarshall
06-30-2003, 12:40 AM
I am developing a car website. I have one two column table. In the cirst column I have it so it lists the models, which are hyperlinked so that the user can click to on a particular model and find details about it on another page. I would like it so that when the user's mouse goes over the hyperlink that a picture of the vehicle displays in column 2 and disappears when it moves off the hyperlink. Does anyone know how to do this by chance or know where I can find sources on how to set this up?

Thanks,

Lmarshall

chrismiceli
06-30-2003, 02:37 AM
for the disappearing picture just give it a style like this

<img src="blah.jpg" style="visibility: hidden">

then do a mousover for the link
<a href="bhal.html" onMouseOver="javascript:document.images[0].style.visibility = 'visible'" onMouseOut="javascript:document.images[0].style.visibility = 'hidden'">

lmarshall
06-30-2003, 05:10 AM
thanks! I tried it in my code but nothing happens. Here is an excerpt of the table. What am I doing wrong? thanks, lmarshall


<table>
<tr>
<td></td>
<td><font size="2" face="Arial, Helvetica, sans-serif">Escort</font></td>
<td rowspan="5"><img src="silverado3500.jpg" style="visibility: hidden"></td>
</tr>
<tr>
<td></td>
<td><font size="2" face="Arial, Helvetica, sans-serif">Focus </font></td>
</tr>
<tr>
<td></td>
<td><font size="2" face="Arial, Helvetica, sans-serif"><a href="trim_f150.htm" onMouseOver="javascript:document.images[0].style.visibility = 'visible'" onMouseOut="javascript:document.images[0].style.visibility = 'hidden'">F150</a></font></td>
</tr>
<tr>
<td></td>
<td><font size="2" face="Arial, Helvetica, sans-serif">Escape</font></td>
</tr>
<tr>
<td></td>
<td><font size="2" face="Arial, Helvetica, sans-serif">Expedition</font></td>
</tr>
</table>