Can someone offer some help with my problem please?
I have the following code:
function InsertNewMeeting(tripID, contact1ID, contact2ID) {
$.ajax({
type: "POST",
url: "RetrieveSites.aspx/InsertNewMeeting",
data: "{'tripID': '" + tripID + "','contact1ID: '" + contact1ID + "','contact2ID', '" + contact2ID + "'}",
contentType: "application/json; charset=utf-8",
datatype: "json",
success: function (msg) { alert('ok'); },
error: function (msg) {alert(msg);}
});
}
This is meant to call a WebService to post 3 integer values. The WebService works 100%.
However, when I’m calling the function from the web page, all I get is a “Object XMLHttpRequest” error.
I’ve examined all parameters that are passed, they are 100% ok.
Is there anything obvious that I’m missing or should be doing?
Your single quotes in your string are all over the place.
The data you send will be this:
Whereas it appears it should be this: