PDA

View Full Version : <a onMouseover="... Question



Rino5555
03-05-2008, 09:00 PM
Hi to all...

i have the following code in a table...
code:
*********************************************
<td bgcolor="045C97" align="CENTER">
<a onMouseover="Mens.src='/MenS01.jpg';MainMens.src='/MenB01.jpg'"
onMouseout="Mens.src='/MenS01.jpg'" width="100" height="80">
<img src="/MenS01.jpg" border="1" name="Mens" width="100" height="80"></a><br>
<a onMouseover="Mens.src='/MenS02.jpg';MainMens.src='/MenB02.jpg'"
onMouseout="Mens.src='/MenS02.jpg'" width="100" height="80">
<img src="/MenS02.jpg" border="1" name="Mens" width="100" height="80"></a><br>
</td>

<td align="CENTER" bgcolor="FFFFFF" >

<img SRC="MainMen.jpg" name="MainMens" width="500" height="400">
</td>

<td bgcolor="045C97" align="center" >

<a onMouseover="Mens.src='/MenS07.jpg';MainMens.src='/MenB07.jpg'"
onMouseout="Mens.src='/MenS07.jpg'" width="100" height="80">
<img src="/MenS07.jpg" border="1" name="Mens" width="100" height="80"></a><br>
<a onMouseover="Mens.src='/MenS08.jpg';MainMens.src='/MenB08.jpg'"
onMouseout="Mens.src='/MenS08.jpg'" width="100" height="80">
<img src="/MenS08.jpg" border="1" name="Mens" width="100" height="80"></a><br>
</td>
*******************************************
what I'm trying to figure out is when i mouse over an image i want to read from my DB and get the description so i can make it appear on top of the big image...

to open and read data from the DB is no problem...

i having trouble on how to store the value in the mouseover code...

Hope someone can help me...

thanking you in advance...

Rino

boogyman
03-05-2008, 09:55 PM
Welcome to the forums, please review our Posting Policies (http://dynamicdrive.com/forums/showthread.php?t=24866) especially in regards to #8 (scroll down the page) posting computer code

you need to use the prefix document to tell the browser you are talking about this specific page, you also are calling out multiple images by the same name attribute, thus confusing the browser even more.



<img src="MainMen.jpg" name="MainMens" width="500" height="400">

<a href="/path/to/link" onmouseover="document.img1.src='/path/to/image.ext';document.MainMens.src='/path/to/image.ext';"> LINK</a>

<img src="/path/to/image" name="img1" width="" height="" alt="__alt_desc__">


<a href="/path/to/link" onmouseover="document.img2.src='/path/to/image.ext';document.MainMens.src='/path/to/image.ext';"> LINK</a>

<img src="/path/to/image" name="img2" width="" height="" alt="__alt_desc__">


where img# is the unique identifier of that specific

Rino5555
03-06-2008, 04:12 PM
maybe i didn't explain myself right...

I have the following code the works perfect...
Set rs = connHartStores.Execute("sp_GetAllMultipleSigncards'" & Request.QueryString("PromoID") & "'")

If not rs.eof Then
Do until rs.eof

<TD VALIGN="TOP" class="PromoDetail">Flyer Signcards<A HREF="/AllSizes.asp?PromoSize=" rs("PromoSize") &PromoID= rs("PromoID") > server.HTMLEncode(rs("PromoSize")) & </A></TD>
<TD align="middle"><A HREF="/Sizes.asp?PromoSize=" & rs("PromoSize") & "&PromoID=" & rs("PromoID") & ></A></TD>

But this works when I click on it, it gets the info I need from my DB...

I would like to do the same think but with my onmouseover...

Is there a way I can do this...

Thanking you in advance...

Rino