By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,384 Members | 1,829 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,384 IT Pros & Developers. It's quick & easy.

Help with Mouseover and mouseoff please

P: 56
Hi, I was wondering if there is a way to "unMouseOver"?

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.

Expand|Select|Wrap|Line Numbers
  1.  
  2. <body>
  3. <script language="javascript"> 
  4. function ShowPic1(sImage) 
  5. {
  6.  sImage = "http://i157.photobucket.com/albums/t58/olivas_enterprises/" + sImage + ".jpg"; document.ShowRoom1.src = sImage; 
  7.  }
  8. function ShowPic2(sImage)
  9. {
  10.  sImage = "http://i157.photobucket.com/albums/t58/olivas_enterprises/" + sImage + ".jpg"; document.ShowRoom2.src = sImage; 
  11.  }
  12.  </script>
  13.  
  14.  
  15. <p dir="ltr">&nbsp;</p>
  16. <p dir="ltr" align="right">
  17.  <a onmouseover="ShowPic1('LSL')" href="http://i157.photobucket.com/albums/t58/olivas_enterprises/LSL.jpg" alt="Ship to Locations">
  18.  <img style="width: 128; height: 31" src="http://i157.photobucket.com/albums/t58/olivas_enterprises/DSL.jpg" name="ShowRoom1">
  19.  
  20.  <a onmouseover="ShowPic2('LCS')" href="http://i157.photobucket.com/albums/t58/olivas_enterprises/LCS.jpg" alt="Customer Service">
  21.  <img style="width: 128; height: 31" src="http://i157.photobucket.com/albums/t58/olivas_enterprises/DCS.jpg" name="ShowRoom2">
  22.  
  23.  
I tried to use the same code and changed onmouseover to onmouseoff - and that didnt' work.

Please help!
Thanks!
Sophie
Aug 10 '08 #1
Share this Question
Share on Google+
2 Replies


P: 56
Nevermind - persistance has paid off - I found it! Thanks though.
Aug 10 '08 #2

acoder
Expert Mod 15k+
P: 16,027
You obviously found onmouseout ;)

PS. code tags are of the square bracket type, i.e. [CODE], not <CODE>. Thanks!
Aug 11 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.