AJAX call in method does not return result ?
I am calling an AJAX function from a certain method, but for any reason it does not return the result.
The JSON object is "Records". The URL is build within another method and properly passed (as I can see in Firebug)
- DataService.prototype.myData = function (jQ_dataelement) {
-
- $.ajax({
- type:'GET',
- contentType: "application/json; charset=utf-8",
- url:this.webServiceLink,
- dataType:'json',
- success: function (resultData) {
- if (resultData["Records"].length > 0) {
- alert ("Number of records = " + resultData["Records"].length )
- } // end success
-
- error: function () {
- alert ("error")
- } // end error
-
- }); // end AJAX
- } // end prototype.myData