I'm trying to update the LastName field for PersonID. I can pass PersonID, but I don't know the syntax for also passing the LastName field.
$('input[name="LastName"]').live('focusout', function() {
var PersonID = $(this).parents("tr").attr("ID");
var LastName = $(this).val(); // todo: serialize
$.ajax({
url:'Remote/Person.cfc?method=UpdateLastName&returnformat=json'
,data:'PersonID='+PersonID
});
$(this).parents("td").empty().append(LastName);
});
Q: Is is something like data:{'PersonID='+PersonID,'LastName='+LastName}
Am I missing a squiggly line or a parenthesis or comma or dot or colon or semi-colon or plus sign or question mark or an apostrophe or quote or dollar sign or something?