adds ajax request to index page