Using a Form Field to Update DataTable
Using a Form Field to Update DataTable
Hello Everyone. Please be kind as programming is not my "day job"!
What I've created is a page that has a form. Using jQuery Autocomplete that form triggers a request to return data from MySQL and populate a form on the page. Based on what the user selected a new request is sent to MySQL and that returned data is used to populate my data table. This all seems to work OK, even with my poor code hacking.
For now I'm using the old .makeEditable (jquery.dataTables.editable.js) but I'm using the new dataTables (jquery.dataTables.min.js). I'm sure I'll probably end up purchasing the new Tables Tools but I thought I'd get this working first before I jumped in and changed all my code.
Right now the code seems to work but every other time the user selects a person in the autocomplete field I'm not able to select a row in the datatable but the datatable is being populated with the new data. If I change my call from .dataTable to .DataTable then the .makeEditable throws an undefined error. I believe that happens because my .dataTable is from jQuery and not from the DataTable plugin. BTW, why if this plugin uses .DataTable is the JS file called jquery.dataTables.min.js and not jquery.DataTable.min.js?
I haven't used DataTables live before so I might have pasted in the code incorrectly but a link to my mess is at:
http://live.datatables.net/wujukata/1/edit?html,js,console,output
I have tried a bunch of things so there's extra commented code that makes this even messier than it already is.
Thanks for your time in looking at this!
George