Results 1 to 3 of 3

Thread: <a onMouseover="... Question

  1. #1
    Join Date
    Mar 2008
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default <a onMouseover="... Question

    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

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    Welcome to the forums, please review our Posting Policies 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.

    Code:
    <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

  3. #3
    Join Date
    Mar 2008
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •