|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Multiple Values from Dropdown
Good day - I am newer to the Javascript world and am building a small site using Paypal as my payment processor. I have in a drop down box the name of my products and price. Paypal however requires separate enteries on their side 'item_name' & 'amount' .
I inserted a <% amount=30.00%> within my <option value>Shirt <% amount=30.00%></option> - like so, I then have a hidden feild pull what amount is. The issue is that the hidden feild only pulls the last price that is listed within my drop box, it won't change when different items are selected. I hope someone can help be get on the right track - Thanks |
|
#2
|
||||
|
||||
|
Try posting your code. Can't really point you in the right direction without seeing what direction you're going in.
__________________
Please don't PM me asking for solutions outside the scope of a thread. Keeping all responses in a thread stands to help others who come along later, which is after all what this forum's all about. |
|
#3
|
|||
|
|||
|
Here is my code that I have inplace - The hidden field 'amount' does function but only pulling the last option <%%> listed - Thanks for any help
<form target="paypal" method="post" action="https://www.paypal.com/cgi-bin/webscr"> <table width="100%" border="0" cellspacing="4" cellpadding="4"> <tr> <td colspan="2" bgcolor="#3399CC"> <div align="center"><strong><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif">Tops</font></strong></div> <div align="center"><strong><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"> <input type="hidden" name="add" value="1"> <input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="business" value=email@domain.com> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="lc" value="US"> <input type="hidden" name="amount" value="<%=(amount)%>"> </font></strong></div> </td> </tr> <tr> <td width="25%"><strong><font size="2" face="Arial, Helvetica, sans-serif">Style</font></strong></td> <td><strong><font size="2" face="Arial, Helvetica, sans-serif"> <select name="item_name"> <option value="P4W">Top- $30 <% amount=30.00%> </option> <option value="P5W">Pants- $35 <%amount=35.00%></option> <option value="P6W">Shoes- $35 <%amount=35.00%></option> |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Multiple Values from Dropdown |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|