AJAX implementation using XHR and without jQuery