I have a script that will show a dropdown box when a td(table data) is clicked. It contains options 'X' and 'O'.
my html table contains data in my data base. My client wants a front-end editing of data because that's easy for them. So i made the td transform to dropdown so that they can put remarks easily. But how can i save to database the changes that users made in table.
Here is my script to make td a dropdown box :
$(document).on('click', 'td', function() { ////---make td transform to dropdown list box when click---///
if($(this).find('select').length == 0) {
$(this).empty(); //clears out current text in the table
$(this).append('<select><option></option><option style="font-size:20px;">X <option style="font-size:20px;">O</select>');
}
});