I have table having 10 rows per page. I am using ajax to delete rec开发者_如何学Goords from table. But when i delete a record i am left with nine rows, which is not desirable.
How to maintain 10 rows per page (wherever applicable) after deletion. And off course i don't want to refresh the page too.
When you POST the request to delete the data, have the response include some new data to insert at the beginning or end of the table.
Even if your data is split up on separate pages it should be considered as a continous list, so simply step through it to the offset after the deleted line to find the next line (which would have been the first line on the next page) and return it with the AJAX response.
精彩评论