Get data from JS through AJAX