I'm trying to create ajax call to update single field in database. My code is:
$.ajax({
type: "POST",
url: 'http://localhost/test_project/dnkuh_stavke/editfield/1',
data: ({ name: 'dnkuh_stavke_order', value: '13', pk:'1' }),
success: function() {
alert('Success');
},
error: function() {
alert('Error occured');
}
});
Link and fieldname should be fine I guess (copied from source code), value is hardcoded for test purposes.
I can't get this work so please help with correct code.