Closed Sharppis closed 11 years ago
Note to myself... remember give some results in "save.php" file. I didn't have nothing there.
I'm using jeditable in table where rows are items and each item has price. Like a shopping list. If I edit item's value increasing or decreasing and want this change effect in the sum of all rows in table, I added $("#tablediv").load(); to load content. Now I have new sum right after edited value is saved.
I'm able to edit data and even able to save it into db, but value disappear from the screen and is replaced with "Click to edit..." text. In other words, div's content, which used to be non-edited, isn't replaced with edited conten, it's replaced with "Click to edit...". Behind the scenes right value and id is sent to save.php, in my case testi_details.php?func=3, where func=3 is information for page to pick up right function for this case.
When I refresh page, edited value will be there and everything is fine. What I'am doing wrong?
$('.edit-money').editable('testi_details.php?func=3', { indicator : 'Saving...', submit: 'OK', id : 'elementid', value : 'newvalue' });
I'm not sure does it effect, but editable div is located in the table which rows' content is fetched from the db. Perhaps not...
I tried to add .done() and .always(); with load(); but it didn't do the magic.