Home › Forums › Back End › Editable form fields? › Reply To: Editable form fields?
May 28, 2014 at 11:05 pm
#171316
Participant
So I keep getting the following error
Uncaught ReferenceError: client is not defined
$('textarea').blur(function(){
var request;
request = $.ajax({
type: "POST",
dataType: "json",
async: true,
data: {
id: client.id,
name: client.name,
address: client.address,
phone: client.phone,
day: client.day,
paid: client.paid,
owe: client.owe,
completed: client.completed
}
});
request.done(function(customer) {
return console.log(customer);
});
request.fail(function(jqXHR, textStatus) {
console.log(jqXHR);
return console.log(textStatus);
});
});
I know we’ve touched on this being a solution but I’m not really understanding this script. Wouldn’t I need to POST
to the session and then update the database with the new session data? This doesn’t seem like it does that but rather posts data to a URL (which I stripped from the script).