In some webapplications and in more and more websites, there are multiple times where an AJAX call is placed. Since the implementation of XMLHttpRequest is slightly different in Internet Explorer than it is in all it's competitors, this requires multiple lines of code just to create the object. So here's a fix.
Using the function below, you can now just call something like:
Here it is:
Offcourse, we don't use browser detects. Furthermore, we only use ActiveX as a last resort, trying XMLHttpRequest first. This way, we ensure maximum compatibility, even for future versions or extended browsers which might support both. If all goes well, the returned object is practically the same in all browsers in all important ways.
Use as you see fit!