Added AJAX functionality to location