PHP returns value with 1-2 second delay jQuery.post doesn\'t wait for response.
How do you think, is it possible to fix that problem and wait for response?
$.post is asynchronous, you need to use $.ajax and set async to false, that way you will be able to wait for the response. You can read more about it here: http://api.jquery.com/jQuery.ajax/