How do I get a value from my Ajax request ?

How do I get a value from my Ajax request ?

I have read about how to get a response from an Ajax request but I just can't seem to get it.  I try to work with the value before it's back from the server so I get an undefined value.

In my page I create a  vacationDayRequested object and assign it to a variable called vdr.

  1.  var vdr = new vacationDayRequested(requestedDate, clockNo);
  2.                 alert(vdr.Selectable)
My  vacationDayRequested object is defined like this:

  1. function vacationDayRequested(_requestedDate,_clockNo) {
  2.     this.status = "unknowm";
  3.     this.ClockNo = _clockNo;
  4.     this.DayRequested = _requestedDate;
  5.     this.Selectable = IsSelectableBASIC(this); 
  6. }
I get the value of the Selectable property by calling a function and going up to the server:

  1. function IsSelectableBASIC(vacationDayRequested)
  2. {
  3.     var returnValue = false;
  4.    
  5.     $.ajax({
  6.         url: "/VacationRequest/IsDaySelectableBASIC",
  7.         type: 'POST',
  8.         contentType: 'application/json; charset=utf-8',
  9.         data: JSON.stringify(vacationDayRequested)

  10.     }).done(function (data) {
  11.         return data.OperationMessage;
  12.     });
  13. }
I know what's happening, but I do not know how to fix the issue.  I am geting an undefined on      alert(vdr.Selectable).  I thought by returning the value from done() would fix my problem.  How do I refactor the code to work with the value I need from the server without changing async to false in the ajax request?