Question: jQuery DataTables altEditor issue

Question

jQuery DataTables altEditor issue

Answers 1
Added at 2017-01-05 20:01
Tags
Question

I've been trying to get this free alternative editor I found here to work but it keeps on blowing up on me because I am terrible at javaScript. Been debugging, reading documentations like mad all day but my scrub mind is out of ideas but I'm still trying anyway.

I deleted some of the stuff it had in there like ajax to server,the ID row, because I don't need those, I just want to be able to insert, edit, and delete rows in the table while keeping the <option> dropdown and pattern validation.

I prepared a jsfiddle with my exact setup here. Any hints/help will be greatly appreciated.

Answers
nr: #1 dodano: 2017-01-06 12:01

Managed to figure it out myself.
This jsfiddle is an updated version that works.
This diff shows the modifications I made compared to the original.
What is the point you ask?
The point is to be able to validate stuff before adding/editing them, to have a neat dropdown select, and to be able to send the data from the table itself as a JSON string in a "Column Name" : "Cell Data" format so that I can json_decode($_POST['table'] and use a nice associative array to add the data to my database.
Why?
Beats me, do what you want with it. I plan to use it to send a list of addresses one way only to the server.
Why not use the official editor?
Because I can't justify the price for my meaningless project and I hardly need 10% of what it offers.

Big thanks to Kingcode.com where I found the free datatables editor alternative and KasperOlesen for making it more awesome.

Source Show
◀ Wstecz