You must use async false in ajax
<script type="text/javascript">
var ajaxResponse;
$.ajax({
type: "POST",
url: "get_price.php",
async: false,
data: "var"+var1,
cache: false,
success: function(response){
ajaxResponse = response;
}
});
</script>
No comments:
Post a Comment