Using .ajax to call web service
I have a web service that returns an array. Code is below: Data variable comes back as blank. I was wonder is that because the method returns an object or am I doing something wrong on my end.
- $.ajax({
- url: "http://FindStreetNameForAllLocalities",
- data: "{ 'PartialStreetName': '" + request.term + "' }",
- dataType: "json",
- type: "POST",
- contentType: "application/json; charset=utf-8",
- success: function(data) {
- if (data == null) {
- alert( "nothing.");
- }
- else {
- alert(data)
- response(data.d)
- }
- }
- });