get the data from xmlhttprequest.response in onload function.  the parameter of the function is a xmlhttprequestprogressevent object, not the data!