created JavaScript file for AJAX requests