4. In the JavaScript function above, for better reading, this value is assigned to a variable JavaScript variable READY_STATE_COMPLETE. Don't confuse state with status. The state is returned by the XmlHttpRequest, while the status is a HTTP code that tells you about the requested access. If for example the requestObject status is 403 then you accessed a server resource that you are not authenticated or authorized for. This status for sure needs a different client handling than 200, which indicates a successful server access. To register the JavaScript callback handler onReadyStateChangeResponse with the XmlHttprequest object, you assign it as a value to the XmlHttpRequest onreadystate method, requestObject.onreadystatechange=onReady\\... which is one of the exposed functionality of the XmlHttpRequest object. The JavaScript function onReadyStateChangeResponse() can be named as you please, as long as the same name is assigned as a value to to requestObject.onreadystatechange . Before you can read the returned message body you need to perform the mentioned checks for the ready state to be 4 and the request status to be 200. The rest of the code is the same as in the examples before. 2. Save your work and run the application. Note that still you see a delay between pressing the button and the server response, but this time the button is released immediately. Basic Troubleshooting The most common problems you find with Javascript is the misspelling of components and variables and the addressing of non-existing properties on a DOM component. There exist debuggers for JavaScript that you