Search the Community
Showing results for tags 'linking input form'.
-
Hello Codingforums, yet again I desire some help to my coding, this time regarding a paypal button. I'm working on a local project of mine in which I wish to let my costumers type the amount of quantities for a product they wish into a text box and then want it to automatically edit the amount of quantities on the paypal page. This works when I have the input inside the form, but due to my template I wish to have my quantity text box outside the "form" code of the paypal button but still want it to connect so that it changes. Let me explain with some code This is the working code for which i can enter the amount of quantities into a text box and it will automatically change it on the paypal page as well. <div id="payment" style="margin-top:10px;"> <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="TEXT" name="quantity" value="1"> <input type="hidden" name="hosted_button_id" value="C5P9LBML2FSC6"> <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_paynow_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypalobjects.com/da_DK/i/scr/pixel.gif" width="1" height="1"> </form> </div> This is what I want it to do, I want to be able to put the input of the quantities text box onto another div and still be able to change the amount of quantities on paypal. (Doesn't change the amount of quantities when clicked on button) <div id="anotherdiv"> <input type="TEXT" name="quantity" value="1"> </div> <div id="payment" style="margin-top:10px;"> <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="C5P9LBML2FSC6"> <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_paynow_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypalobjects.com/da_DK/i/scr/pixel.gif" width="1" height="1"> </form> </div> Thx in advance - rec0il
- 7 replies
-
- paypal
- linking input form
-
(and 3 more)
Tagged with: