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

At the time I was trying to avoid external dependencies if I didn't need them. But since we will be using jQuery already, there's no reason for me to avoid the jQuery posts etc

On Jan 31, 2012, at 3:28 PM, Zorayr Khalapyan wrote:

> 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.");
> };
> ```
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/derrickj/Ohmage-Phonegap/commit/ed3fc5ec8a6b24c80a2bee61f003d77613ecee3f#commitcomment-920622