Update index.html

Setting up a function for XHR requests.