AJAX call in method does not return result ?

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)

  1.     DataService.prototype.myData = function (jQ_dataelement) {
  2.  
  3.         $.ajax({
  4.                   type:'GET',
  5.                   contentType: "application/json; charset=utf-8",
  6.                   url:this.webServiceLink,
  7.                   dataType:'json',
  8.                   success: function (resultData) {
  9.                       if (resultData["Records"].length > 0) {
  10.                        alert ("Number of records = " + resultData["Records"].length )
  11.                     } // end success
  12.                 
  13.                   error: function () {
  14.                       alert ("error") 

  15.                     } // end error
  16.                  
  17.           }); // end AJAX
  18.         } // end prototype.myData