Updating other cells within a table, triggered by the update of dependent cell.
Updating other cells within a table, triggered by the update of dependent cell.
I have a datatable that (for the sake of simplicity) records an item's name, buyer number, price, quantity, extented price (price * qty), and the buyer's name.
I need to make it so that when you update:
- Item Price OR Item Qty, the math is automatically re-done and saved into the database.
- Item Buyer Number, the query selecting the buyers name from the list of buyers(and their ID's) updates with the new buyer's name from the given buyer's number.
I've gotten as far as to get the following results:
On update, edit box freezes (cannot edit again until page reload).
On update, information in the database is recorded as $0.00 (for extended price (from price * qty)).
I'm fairly new to Javascript/Ajax but I have extensive experience with PHP, but I'm just a little confused at the moment.
Any help is well appreciated, thanks! - Logan.
Here is a link to a screenshot detailing my thinking: http://prnt.sc/cwkm7p
Answers
I probably should've asked this on the editor forum..sorry.
Let me include that I'm using the most recent version of datatables, jquery, and the Editor PHP Libs.