Is it possible to get an PHP class variable with Ajax on load ? My class is called when submit is clicked and I was wondering if there is any way I can get the value in alert box when the loading is done ?
EDIT:
class VacationCalc {
......
function VacationLeft($date) {
$someValue = (strtotime($date) - strtotime($this->worker->vacationStartDate)) / 86400;
$rest = $someValue - $this->vacationWithoutPay;
echo $this->leftDays = number_format($this->worker->daysInyear + ($rest * ($this->worker->vacationDaysInYear / 365.25)) - $this->daysAllreadyDone,1,',',' ');
}
}
}
I would like to get the value to an alert box after loading is done.