« xmlResolveEntities(text) | Main | ajaxslt 0.2 and IE6.0 »

Thursday, July 14, 2005

XMLHttpRequest()

var req = new XMLHttpRequest();

if (req) {

req.onreadystatechange = function() {

//alert( req.readyState+","+req.status);

//if (req.readyState == 4 && req.status == 200)

if (req.readyState == 4 ) //for local

{

alert(req.responseXML);

}

};

req.open('GET', 'data.xml');

req.send(null); }

}

Cross-Browser XMLHttpRequest v1.2
=================================
Emulate Gecko 'XMLHttpRequest()' functionality in IE and Opera. Opera requires
the Sun Java Runtime Environment <http://www.java.com/>.
by Andrew Gregory
http://www.scss.com.au/family/andrew/webdesign/xmlhttprequest/

Posted by at 9:04 AM
Categories: Andrew Gregory's xmlhttprequest.js