I'm having problems passing data values to the Jquery Ajax function.
I have been using the getJSON function and that was working fine but now I want to use the ajax function and I can't work out how to pass in 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 this right? Can anyone tell me where i'm going wrong?
Thanks