XMLHttpRequest Object |
-- Learn not just technology, but also dreams!
- Home
- HTML
- JavaScript
- CSS
- Vue
- React
- Python3
- Java
- C
- C++
- C#
- AI
- Go
- SQL
- Linux
- VS Code
- Bootstrap
- Git
- Local Bookmarks
XML Tutorial
XML Tutorial XML Intro XML Usage XML Tree Structure XML Syntax XML Elements XML Attributes XML Validation XML Validator XML View XML CSS XML XSLT
XML JavaScript
XML HTTP Request XML Parser XML DOM XML/HTML XML Applications
XML Advanced
XML Namespaces XML CDATA XML Encoding XML Server XML DOM Advanced XML Notes XML Technologies XML Real Life Cases XML Editors XML E4X XML Summary XML Examples
Deep Dive
- Web Browser
- Scripting Language
- Computer
- Computer Hardware
- Programming Language
- Web Services
- Computer Science
- Software
- Web Design and Development
- Web Service
XMLHttpRequest Object
The XMLHttpRequest Object is used to exchange data with the server in the background.
The XMLHttpRequest Object is a developer's dream, because you can:
- Update webpages without reloading the page
- Request data from the server after the page has loaded
- Receive data from the server after the page has loaded
- Send data to the server in the background
To learn more about the XMLHttpRequest Object, please study our XML DOM Tutorial.
XMLHttpRequest Instance
When you type a character in the input field below, an XMLHttpRequest is sent to the server - returning suggested names (from a file on the server):
Type a letter in the input box:
First Letter
Suggestions:
Create an XMLHttpRequest Object
All modern browsers (IE7+, Firefox, Chrome, Safari, and Opera) have a built-in XMLHttpRequest object.
Syntax for creating an XMLHttpRequest object:
xmlhttp=new XMLHttpRequest();
For older versions of Internet Explorer (IE5 and IE6), use an ActiveX object:
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
In the next chapter, we will use the XMLHttpRequest object to retrieve XML information from the server.
YouTip