开发者

"User Sortable Items" UPDATE-ed to Database

开发者 https://www.devze.com 2023-02-12 01:32 出处:网络
I want to use this jQuery-UI-sortable in a project What is the best practice to UPDATE the database after the user has finished sorting it?

I want to use this jQuery-UI-sortable in a project

What is the best practice to UPDATE the database after the user has finished sorting it?

Should I开发者_如何学C update on every release? OR have the user sort first and then press "Save"?

Also how do I retrieve the new order of the items and then update the database?

I'm thinking JSON Array + hidden form for the ID but I'm still confused. Thanks


Yes, put a button "Save", automatically saving at each release is not only dangerous but also very confusing for the user, a "Save" button is straightforward.

As for how, yeah, a JSON array that you send to your back-end and that's it.

0

精彩评论

暂无评论...
验证码 换一张
取 消