What are XMLHttpRequest Object in Ajax?

0 votes
I want to know how can i create XMLHttpRequest object with examples?
Jan 31 in Java-Script by kartik
• 1,910 points
26 views

1 answer to this question.

0 votes

 As, you are up to ajax so you might also know that all modern browsers support the XMLHttpRequest object.

The XMLHttpRequest object can be used to exchange data with a web server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page.

Create an XMLHttpRequest Object

All modern browsers (Chrome, Firefox, IE7+, Opera) have a built-in XMLHttpRequest object.

Syntax for creating an XMLHttpRequest object:

variable = new XMLHttpRequest();

Example

var xhttp = new XMLHttpRequest();

 Some of the XMLHttpRequest Object Methods are give below for your reference:

Method Description
new XMLHttpRequest() Creates a new XMLHttpRequest object
abort() Cancels the current request
getAllResponseHeaders() Returns header information
getResponseHeader() Returns specific header information.
 
If you Want to learn more about Javascript/ajax refer  this https://www.edureka.co/search/ajax


 

answered Jan 31 by Niroj
• 3,230 points

Related Questions In Java-Script

0 votes
0 answers
0 votes
0 answers

Anyone can help me out to understand the semantic of (document.getElementBYId("demo").innerHTML="Hello") ?

Hello guys, Can Someone helps me to find ...READ MORE

Jan 17 in Web Development by anonymous
• 1,910 points
26 views
+1 vote
1 answer

What is the relationship between angularjs Scope with controller/view?

Let us consider the below block: <div ng-controller="emp"> ...READ MORE

answered Jan 20 in Web Development by Niroj
• 3,230 points

edited Jan 21 by Niroj 29 views
+1 vote
1 answer

What are pseudo class in css??

Hey, The state of an element is controlled  by ...READ MORE

answered Jan 20 in Web Development by Niroj
• 3,230 points

edited Jan 21 by Niroj 22 views
0 votes
1 answer

What is callback function in JavaScript?

callback is not a keyword, its just ...READ MORE

answered Jan 30 in Java-Script by Niroj
• 3,230 points
31 views
0 votes
2 answers

What are all the different ways to create an object in Java?

There are different ways you could do this ...READ MORE

answered Aug 19, 2019 in Java by Sirajul
• 48,530 points
126 views
0 votes
1 answer

What are the stages available in object studio that is not available in process studio?

Hey Pratibha, Blue Prism provides some additional ...READ MORE

answered Oct 18, 2019 in RPA by Abha
• 27,760 points
844 views
0 votes
1 answer

What are different Run modes available for an object in Blue Prism?

Hi Apeksha, various run modes are available ...READ MORE

answered Oct 18, 2019 in RPA by Pratibha
• 3,690 points
1,264 views
+1 vote
2 answers

What possible return values are there in Jenkins plugin “Sonarqube scanner”

Use Webhooks in SonarQube Administration setup to ...READ MORE

answered Aug 3, 2018 in Jenkins by Nilesh
• 6,960 points
2,110 views
0 votes
1 answer

What are the differences between getText() and getAttribute() functions in Selenium WebDriver?

See, both are used to retrieve something ...READ MORE

answered Apr 5, 2018 in Selenium by nsv999
• 5,510 points
7,083 views