Please Help. In my ajax call getting error Invalid JSON primitive, whats wrong with this following ajax call
$.ajax({
url: \"/Precedent/
Try with, remove " ' " from data,
data:{partyId:party,PartySelCombo:valueFrom,DocumentId:DocId}
Use single quote to assign your values like
Wrong:
$.ajax({
type: 'POST',
contentType: 'application/json',
dataType: 'json',
url: 'WebService.asmx/Hello',
data: { FirstName: "Dave", LastName: "Ward" }
});
Right:
$.ajax({
type: 'POST',
contentType: 'application/json',
dataType: 'json',
url: 'WebService.asmx/Hello',
data: '{ FirstName: "Dave", LastName: "Ward" }'
});
Please follow below link for clarifications
Invalid Json Premitive Possible Reason