We are selling products on our website and trying to integrate the PayPal "Add to Cart" and "View Cart" buttons to work properly. Individually, the "Add to Cart" works but once we add the "View Cart" html, both buttons perform as if it was the "View Cart". I think the problem is that we aren't separating the portions of code. Here is the code that we have. Again, if we put each code in separately, it performs as expected.
onclick="document.getElementById('Form').target='paypal';
document.getElementById('Form').action='https://www.paypal.com/cgi-bin/webscr';"
type=image alt="Make payments with PayPal - it's fast, free and secure!"
src="https://www.paypal.com/en_US/i/btn/x-click-but22.gif" border=0 name=submit>
onclick="document.getElementById('Form').target='paypal'; document.getElementById('Form').action='https://www.paypal.com/cgi-bin/webscr';" type=image alt="Make payments with PayPal - it's fast, free and secure!" src="https://www.paypal.com/en_US/i/btn/view_cart_02.gif" border=0 name=submit>
If someone could take a look at it and let me know what I need to change, it would be much appreciated.