Add record and save csv file ?
Add record and save csv file ?
naltap
Posts: 2Questions: 1Answers: 0
Hi,
with success i load a csv file from my html page.
It's a very usefull library, many thanks.
Now i would like, have some buttons to add, edit or delete records (row).
Is it possible without web server (.net, ajax, php, ...) with only javascript ?
If yes, the record added or delete is it automaticcaly saved in the csv file ?
Many thanks for response.
Regards
NaltaP
This question has accepted answers - jump to:
This discussion has been closed.
Answers
Maybe this might give you some answers: https://editor.datatables.net/examples/simple/noAjax.html
In addition to the no ajax example:
If you export a new CSV file using Buttons then yes, it would be included in that. It wouldn't be written into the CSV file on your hard disk automatically though - that would be a massive security issue!
Allan
Hi,
thanks for your feedback.
With the example
$('#example').DataTable( {
dom: "Bfrtip",
ajax: "../php/staff.php",
And with my csv file and not data in the html inner, how to know the name for #example ?
I'm sorry, but i'm new for this topic.
Is it possible to have, button for each rows with a pen, trash, ... little picture ?
Regards
Naltap
I don't really understand how your CSV file fits in there. You show
ajax
pointing at a PHP file. Do you have that reading the CSV file?Yes. That example shows text controls, but you could easily just have it show an icon.
Allan