function ajaxRequest(callback) {
var block = ("autocomplete_job");
//alert("ajaxRequest");
$.ajax({
type: "POST",
url: "php/zn-edit_controller.php",
//async:false,
data: ({
ZNID: ZNID,
block: block
}),
/* прочие настройки */
success: function(data) {
response = data.split("~");
callback(response);
}
});
return response;
};
ajaxRequest(function(response){
alert(response);
});