Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jul 2012
    Posts
    19
    Thanks
    3
    Thanked 0 Times in 0 Posts

    onmouseover is working but onmouseout is not working.

    Hello

    I am creating add to cart paypal button with javascript in it. My code is working fine only in opera mini but not in firefox, chrome & IE. Problem is that onmouseover is working but onmouseout is not working. Following is the code -

    Code:
    <form target="paypal" action="*******" method="post">
    <input type="hidden" name="*****" value="******">
    <input type="hidden" name="*******" value="********">
    <input type="image" src="http://images.mydomain.com/Add%20To%20Cart.png" border="0" name="submit" alt="Add to Cart" onmouseover=javascript:this.src='http://images.mydomain.com/Add%20To%20Cart%20Hover.png';onmouseout="javascript:this.src='http://images.mydomain.com/Add%20To%20Cart.png';">
    </form>
    Thanks

  • #2
    Senior Coder
    Join Date
    Dec 2010
    Posts
    2,395
    Thanks
    12
    Thanked 569 Times in 562 Posts
    Maybe it's the missing double quotes and the missing space before onmouseout
    Code:
    onmouseover="this.src='http://images.mydomain.com/Add%20To%20Cart%20Hover.png';" onmouseout="this.src='http://images.mydomain.com/Add%20To%20Cart.png';"

  • Users who have thanked devnull69 for this post:

    vaibhavbthl (07-19-2012)

  • #3
    New Coder
    Join Date
    Jul 2012
    Posts
    19
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thank You very much devnull69 for your quick response and easy fix. Now my button is working correctly in all browsers.


  •  

    Tags for this Thread

    Posting Permissions

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