![]() |
John Clare's Personal Website | Sunday, May 20, 2012 |
| IE-only Drag-n-Drop Experiment | ||
At some time or another, every programmer will have to design an interface for re-sequencing. When coded for the Web, that usually means update access to some index number, or designing a submission method for each individual up/down request.
Or... you could do most of it entirely client-side, with some relatively simple javascript and the "InsertBefore()" method.
So here's my proof-of-concept experiment. This list of names is sourced from an Access Database file, and sorted by the sequence number you see here. Move the cursor over the rows, and click on one of them to select it. Once selected, you can move it up or down the list with the buttons below. Better yet, you can even drag-n-drop the row with the mouse.
Check out this experiment, view the page source, play and enjoy. (There's only one disclaimer - this is mostly functional only for Internet Explorer.)