Help with Mouseover and mouseoff please

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • scolivas
    New Member
    • Oct 2006
    • 56

    Help with Mouseover and mouseoff please

    Hi, I was wondering if there is a way to "unMouseOve r"?

    I have the following script that does the mouse over - but I want the image to go back to the original when the mouse leaves the area.

    Code:
    <body>
    <script language="javascript"> 
    function ShowPic1(sImage) 
    {
     sImage = "http://i157.photobucket.com/albums/t58/olivas_enterprises/" + sImage + ".jpg"; document.ShowRoom1.src = sImage; 
     }
    function ShowPic2(sImage)
    {
     sImage = "http://i157.photobucket.com/albums/t58/olivas_enterprises/" + sImage + ".jpg"; document.ShowRoom2.src = sImage; 
     }
     </script>
    
    
    <p dir="ltr">&nbsp;</p>
    <p dir="ltr" align="right">
     <a onmouseover="ShowPic1('LSL')" href="http://i157.photobucket.com/albums/t58/olivas_enterprises/LSL.jpg" alt="Ship to Locations">
     <img style="width: 128; height: 31" src="http://i157.photobucket.com/albums/t58/olivas_enterprises/DSL.jpg" name="ShowRoom1">
     
     <a onmouseover="ShowPic2('LCS')" href="http://i157.photobucket.com/albums/t58/olivas_enterprises/LCS.jpg" alt="Customer Service">
     <img style="width: 128; height: 31" src="http://i157.photobucket.com/albums/t58/olivas_enterprises/DCS.jpg" name="ShowRoom2">
    I tried to use the same code and changed onmouseover to onmouseoff - and that didnt' work.

    Please help!
    Thanks!
    Sophie
    Last edited by acoder; Aug 11 '08, 10:54 AM. Reason: fixed code tags
  • scolivas
    New Member
    • Oct 2006
    • 56

    #2
    Nevermind - persistance has paid off - I found it! Thanks though.

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      You obviously found onmouseout ;)

      PS. code tags are of the square bracket type, i.e. &#91;CODE], not <CODE>. Thanks!

      Comment

      Working...