derrickj/Ohmage-Phonegap — comment on commit ed3fc5ec8a6b24c80a2bee61f003d77613ecee3f
File: www/js/OhmageAPI.js line 57
By zkhalapyan:

Why don't you use JQuery AJAX methods like $.post(...) or $.get(...). Using the library functions will allow you to do cross-platform compatible and simpler AJAX calls. If you don't want JQuery, then you will have to instantiate your HTTP request object as such:

```JavaScript
if (typeof XMLHttpRequest == "undefined")
XMLHttpRequest = function () {
try { return new ActiveXObject("Msxml2.XMLHTTP.6.0"); }
catch (e) {}
try { return new ActiveXObject("Msxml2.XMLHTTP.3.0"); }
catch (e) {}
try { return new ActiveXObject("Microsoft.XMLHTTP"); }
catch (e) {}
//Microsoft.XMLHTTP points to Msxml2.XMLHTTP and is redundant
throw new Error("This browser does not support XMLHttpRequest.");
};
```