From efc5160f320b94126829c939bd0a67fd15bcda6c Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 6 Aug 2013 22:15:00 -0400 Subject: [PATCH] make XHR work in IE6 --- dygraph.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dygraph.js b/dygraph.js index cc5f64b..994f7fb 100644 --- a/dygraph.js +++ b/dygraph.js @@ -3542,7 +3542,16 @@ Dygraph.prototype.start_ = function() { if (line_delimiter) { this.loadedEvent_(data); } else { - var req = new XMLHttpRequest(); + // REMOVE_FOR_IE + var req; + if (window.XMLHttpRequest) { + // Firefox, Opera, IE7, and other browsers will use the native object + req = new XMLHttpRequest(); + } else { + // IE 5 and 6 will use the ActiveX control + req = new ActiveXObject("Microsoft.XMLHTTP"); + } + var caller = this; req.onreadystatechange = function () { if (req.readyState == 4) { -- 2.7.4