-
-
Save craveytrain/1706728 to your computer and use it in GitHub Desktop.
dataType method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function () { | |
$.ajaxSetup({ | |
type: "POST", | |
contentType: "application/json; charset=utf-8", | |
data:"{}" | |
}); | |
var geoRequest = { | |
"geoRequest": { | |
"counties": ["Travis"], | |
"latitude1":0.0, | |
"latitute2":0.0, | |
"layers":null, | |
"longitude1":0.0, | |
"longitude2":0.0, | |
"zipCode":null | |
} | |
}; | |
var dataToSend = JSON.stringify(geoRequest); | |
$.ajax({ | |
url: "http://theserver/GeoLocationService/GeoLocationService.svc/find", | |
data: dataToSend, | |
dataType: "json", | |
success: function(data){ | |
console.log(data.d); //keep getting null, but the post is actually returning | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment