The first place to look is in your browser's developer tools. Specifically the "Network" option so we can see what data is submitted on edit and what data is returned.
Is there a way to exclude certain fields from being updated, both on the front end, so the user cannot change them, or via the update query?
What has happened is the date of the record changed from the weekending date to the current date, so it seems to disappear when it's date had just changed.
Is there a way to exclude certain fields from being updated, both on the front end, so the user cannot change them, or via the update query?
Remove them from the form with the clear() method. You can then add new fields, if you need to, using add().
What has happened is the date of the record changed from the weekending date to the current date, so it seems to disappear when it's date had just changed
That sounds like a MySQL gotcha. Are you submitting a value for that date field?
Answers
Can you link me to the page so I can take a look please?
The number of columns defined in the
columns
option should exactly match the number of columns in the HTML for the table.Allan
it's on my machine, localhost. not possible.
Pete
if I inspect the th element it shows
<th class="sorting" tabindex="0" aria-controls="hourstable" rowspan="1" colspan="1" aria-label="
Regards
Pete
Fixed it! It was my fault, the HTML had an error. Sorry.
Now all I need to be able to do is reload the table on change of a form field.
Regards
Pete
It seems the ajax.reload() doesn't POST variables as defined in the data: section of the original load.
How can I pass it the changed variables?
Regards
Pete
You need to use
ajax.data
as a function:Do the same for Editor.
See
ajax.data
andajax.data
for further information.Allan
Sorry, not sure I understand, as part of the reload?
$('#bu').change(function(){
table.ajax.reload();
});
Can I use it here?
Pete
Ok, got it.
Once again, thanks so much for your help. I thnk I can close this one now.
Regards
Pete
Oh no, not quite. It seems that I cannot edit a record. I click update and the record returns to it's original state.
If I try in-line editoring, the record disappears!
Is there somethign that logs the update process?
Regards
Pete
The first place to look is in your browser's developer tools. Specifically the "Network" option so we can see what data is submitted on edit and what data is returned.
Allan
Allan,
Is there a way to exclude certain fields from being updated, both on the front end, so the user cannot change them, or via the update query?
What has happened is the date of the record changed from the weekending date to the current date, so it seems to disappear when it's date had just changed.
Regards
Pete
Allan,
or, can I update the record with data from the form but not in the datatable?
Regards
Pete
Remove them from the form with the
clear()
method. You can then add new fields, if you need to, usingadd()
.That sounds like a MySQL gotcha. Are you submitting a value for that date field?
Allan