We help IT Professionals succeed at work.

Drag and drop table row and save a postion after a static row

Ron Baas
Ron Baas asked
on
Hello I have a question. I have a php in which a table rows are loaded from a database. The drag and drop from a tables rows to, for example, PAGE 1 works. Now I want the "page order" of the table row to automatically become 1, so that when reloading it is placed under page 1. At Page 2 a "2" etc. I hope someone can advise me hotestdragdrop.jpgw I can do that.
ajaxPro.php
index.php
Comment
Watch Question

Hi,

I'm not sure what you are trying to do but I'm working a lot with tables and
I highly recommend you to use Datatables https://datatables.net/ 
which is very flexible with a tons of ready to use features see thes examples https://datatables.net/examples/index

It also come with Localstorage this is called stateSave https://datatables.net/reference/option/stateSave
this allow to remember the state of the column, row, search, filter etc
https://datatables.net/examples/basic_init/state_save.html

You can use the default params or use the advance params  for more complex needs

This can be use also with server side https://datatables.net/manual/server-side

They also have a form https://editor.datatables.net/