I’m trying to implement a Paypal button with a dynamic value. When I enter, for example, value=”300.00″, the button works fine.
However, if I do it my way, the button doesn’t work properly. The variable price is the JS variable that holds the information I need to put into the Paypal button.
Here’s the line of code at fault:
<input type="hidden" name="amount" value="<script>document.write(price)</script>.00">
In javascript:
Or better yet
DEMO