Click to Rate and Give Feedback
Properties
 XMLHttpRequest Property
XMLHttpRequest Property

Instantiates the XMLHttpRequest object for the window.

Syntax

[ oRequest = ] window.XMLHttpRequest

Possible Values

oRequest Object that receives the XMLHttpRequest.

The property is read-only. The property has no default value.

Remarks

If the cross-domain request feature has been disabled in Windows Internet Explorer, this method returns null.

XMLHttpRequest was introduced in Internet Explorer 7

Example

The following script demonstrates how to create and use the XMLHttpRequest object:

if (window.XMLHttpRequest)
{
   var oReq = new XMLHttpRequest();
   if (oReq) {
      oReq.open("GET", "http://localhost/test.xml");
      oReq.send();
      alert(oReq.statusText);
   }
}

Standards Information

This property is defined in The XMLHttpRequest Object (W3C Working Draft) World Wide Web link.

Applies To

window
Tags What's this?: Add a tag
Community Content
 
Add Community Content
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker