Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialmarkzerba
2,481 PointsPaypal 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!
8 Answers
Paul Mather
3,313 PointsCan you post the code here?
markzerba
2,481 Points<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>
Paul Mather
3,313 PointsWrap your code with 3 backticks (```) on the line before and after.
markzerba
2,481 PointsThanks Paul. This made it much better, but the backticks show up on the site....was that expected?
markzerba
2,481 PointsThanks Paul. This made it much better, but the backticks show up on the site....was that expected?
markzerba
2,481 PointsThanks Paul. This made it much better, but the backticks show up on the site....was that expected?
Paul Mather
3,313 PointsHi 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.
markzerba
2,481 PointsOk, 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>
(
)
markzerba
2,481 Pointsmarkzerba
2,481 Points<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>