Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

General Discussion

Paypal Button Issue In Fire Fox & Chrome

I've dropped in a basic drop down menu style paypal form button to accept payments on my site. It works fine in Internet Explorer, but only a very small portion of the button is showing up as a link when I tested it in Chrome and Firefox.

I have the same issue with a link button I created for a custom PHP form submit button I created as well so I think its something I'm doing. Any ideas? Many thanks in advance!

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="CS4PZDNSMTMLA"> <table> <tr><td><input type="hidden" name="on0" value="Quick Fix Services">Quick Fix Service Options</td></tr><tr> <td><select name="os0"> <option value="Packaging Mentor">Packaging Mentor $0.01 USD</option> <option value="Packaging Problem Solver">Packaging Problem Solver $0.02 USD</option> </select> </td></tr> </table> <input type="hidden" name="currency_code" value="USD"> <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/x-click-but6.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> </form>

8 Answers

Can you post the code here?

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="CS4PZDNSMTMLA"> <table> <tr><td><input type="hidden" name="on0" value="Quick Fix Services">Quick Fix Service Options</td></tr><tr><td><select name="os0"> <option value="Packaging Mentor">Packaging Mentor $0.01 USD</option> <option value="Packaging Problem Solver">Packaging Problem Solver $0.02 USD</option> </select> </td></tr> </table> <input type="hidden" name="currency_code" value="USD"> <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/x-click-but6.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> </form>

Wrap your code with 3 backticks (```) on the line before and after.

Thanks Paul. This made it much better, but the backticks show up on the site....was that expected?

Thanks Paul. This made it much better, but the backticks show up on the site....was that expected?

Thanks Paul. This made it much better, but the backticks show up on the site....was that expected?

Hi Mark,

My apologies, i meant you should use the backticks to post the code here to show me your code - it doesn't show properly in the posts above when you tried pasting it. If you find that your code on your live site is now showing better, there's a chance that you're missing a ' or two in your code so it's breaking the code on your website.

If you want some more help, feel free to provide your Skype or email and i'll help you fix your issue.

Ok, here's the code. Sorry I didn't realize it didn't all show up. This is code directly provided by paypal's button creator on their site. However, I removed their 1x1 tracking image. Do you think my issue is just a syntax issue somewhere on this page? The page is about 500 lines of code.... I'll start searching, but if you see anything strange below please let me know. I also read nested forms could cause issues. Within this page I have a few conditionals and within one of them I have another form that needs to be submitted before the users moves to a payment page where this paypal form is located. They aren't really nested so I didn't think that was the issue, however the form I'm referring to has a similar issue as this paypal button.

() <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="CS4PZDNSMTMLA"> <table> <tr><td><input type="hidden" name="on0" value="Quick Fix Services">Quick Fix Services</td></tr><tr><td><select name="os0"> <option value="Packaging Mentor">Packaging Mentor $0.01 USD</option> <option value="Packaging Problem Solver">Packaging Problem Solver $0.02 USD</option> </select> </td></tr> </table> <input type="hidden" name="currency_code" value="USD"> <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/x-click-but6.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> </form> ()