Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript Drag & Drop Sortable List Compatibility with Form Submit ?

Status
Not open for further replies.

blink416

Technical User
Mar 22, 2005
20
GB
I have a problem at under the heading Favourite Foods : I'm using a script to sort a list of items by drag and drop ( and it works fine on its own.

The issue arises when I wish to submit the data in the listboxes and textboxes within the sortable list to a MySQL database to be recorded. Namely, the data that client enters into these listboxes and textboxes are passed through only for those entries that are not sorted within the list by drag and drop i.e. as soon as the user has drag and dropped one of the items, the data user has entered is not recorded in the database for that item - and it doesn't matter whether the user enters the data before or after the drag and drop. And to be more specific, the data is actually recorded if you just move the list item around on spot (without dragging it across any items), but as soon as you move it across, even without release (drop) and come back to the original location, data is not recorded. In other words it seems that the 'drag across' event in the sortable list script seems to erase the user input or seems unable to pass it through form submit ... I hope this description is understandable. How do I get all data to pass through, irrespective of how much the user sorts the list ?

Many thanks !

p.s. I'm using Form Tools to record the submitted data in my MySQL database ( and I believe there should be no problems on that side.
 
I got it to work with an 'ugly' workaround ... (which requires autocomplete to be turned off, however)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top