Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-19-2012, 07:42 AM   PM User | #1
vaibhavbthl
New Coder

 
Join Date: Jul 2012
Posts: 19
Thanks: 3
Thanked 0 Times in 0 Posts
vaibhavbthl is an unknown quantity at this point
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
vaibhavbthl is offline   Reply With Quote
Old 07-19-2012, 07:47 AM   PM User | #2
devnull69
Senior Coder

 
Join Date: Dec 2010
Posts: 2,245
Thanks: 10
Thanked 531 Times in 525 Posts
devnull69 will become famous soon enough
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';"
devnull69 is offline   Reply With Quote
Users who have thanked devnull69 for this post:
vaibhavbthl (07-19-2012)
Old 07-19-2012, 08:37 AM   PM User | #3
vaibhavbthl
New Coder

 
Join Date: Jul 2012
Posts: 19
Thanks: 3
Thanked 0 Times in 0 Posts
vaibhavbthl is an unknown quantity at this point
Thank You very much devnull69 for your quick response and easy fix. Now my button is working correctly in all browsers.
vaibhavbthl is offline   Reply With Quote
Reply

Bookmarks

Tags
javascript, onmouseout, onmouseover

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:45 PM.


Advertisement
Log in to turn off these ads.