Inspired? No home

XMLHttpRequest in IE7: case-sensitive

The native XMLHttpRequest object in IE7 is case-sensitive. This is no big surprise (it is the case in other browsers and all standards are) - however that was not the case with the XMLHttpRequest active-x object in earlier versions of IE. So if you have old code that used uppercase in method/functions that worked with IE6 you have to change it for it to work in IE7. Took me a while to figure out why an old script of mine wasn't working...

Example:

Works in IE6 with XHR as ActiveX:
alert( XHR.Status );
Rewrite to the following to get it to work in IE7 using the native XHR object:
alert( XHR.status );

Click here to see the example in action.

Technorati:

Written on 19 July 2006.
blog comments powered by Disqus