I am having problems passing data to a Jquery Ajax function.
I am using the getJSON function and this works fine, but now I want to use the ajax function and I cannot figure out how to pass the values.
$.ajax({
type: "POST",
url: '../../../WebServices/ImageLibrary.svc/getimagesinfolder',
dataType: 'json',
data: "{ 'id', '2' }",
contentType: "application/json; charset=utf-8",
success: function (data)
{
alert('hello');
}
});
Is it correct? Can someone tell me where I'm going wrong?
thank
source
share