Adds AJAX functionality to form submission on index.html