Hi all
I'd be really grateful if someone could tell me the correct method for dealing with the following problem. See attached mock-up of my site's order table.
The user is allowed to change the quantity of items (input fields in the green box) to select which suppliers to order from, and based on this the values in the red boxes should be calculated.
It should be a simple problem of multiplying quantities by prices and summing across suppliers for each product... but I want to do it in javascript without reloading the page : )
All values are taken from my database and stored in a php associative array - which seems to be the main complicating factor as it's quite a deep one. eg
$products[13789]['sellers'][3]['products_price'] = 16.99
How would you guys tackle this? Are there any examples/tutorials out there you can point me to?
Thanks, Steve
ps not sure if I can attach a file in the usual way. Apologies if the image doesn't appear
I'd be really grateful if someone could tell me the correct method for dealing with the following problem. See attached mock-up of my site's order table.
The user is allowed to change the quantity of items (input fields in the green box) to select which suppliers to order from, and based on this the values in the red boxes should be calculated.
It should be a simple problem of multiplying quantities by prices and summing across suppliers for each product... but I want to do it in javascript without reloading the page : )
All values are taken from my database and stored in a php associative array - which seems to be the main complicating factor as it's quite a deep one. eg
$products[13789]['sellers'][3]['products_price'] = 16.99
How would you guys tackle this? Are there any examples/tutorials out there you can point me to?
Thanks, Steve
ps not sure if I can attach a file in the usual way. Apologies if the image doesn't appear