devolver datos con AJAX
set the option async: false and make it non-asynchronous
Lazy Lizard
set the option async: false and make it non-asynchronous