Forum Moderators: coopster
I am working on a shopping cart right now and I am trying to make the user able to edit the quantity of each product.
Currently, I have a table that shows the product name, price, quantity (which is in an input textfield) and final price (which is the quantity X price).
I was curious how I can make it so I can have them enter a new number in the quantity field and it will automatically update the final price.
I hope I explained my problem well :)
Thanks.
Wes
On the server side, you simply receive the "update price" posted form and calculate the new price and redisplay the form.
Even if you show it on the client-side, you'll want to calculate the update on the server-side and make sure it is correct/accurate since information such as this could be modified outside of your control on the client-side.