- Create XHR object.
- Call XHR.open() method to GET the URL.
- Send the request.
- When XHR Ready State change call a process funtion.
- Ceate process function that do:
- Check if the XHR Ready state is DONE and XHR Status OK.
- Parse XHR reponseText.
- Call a function to show some information from reponseText in HTML page.
- Create a function to show data in HTML page:
- Get body element.
- Create a new element.
- Append our new element to body element.