148 |
|
|
149 |
try |
try |
150 |
{ |
{ |
151 |
|
var xmldoc; |
152 |
// Use the standard DOM Level 2 technique, if it is supported |
// Use the standard DOM Level 2 technique, if it is supported |
153 |
if (document.implementation && document.implementation.createDocument) |
if (document.implementation && document.implementation.createDocument) |
154 |
{ |
{ |
155 |
// Create a new Document object |
// Create a new Document object |
156 |
var xmldoc = document.implementation.createDocument("", "", null); |
xmldoc = document.implementation.createDocument("", "", null); |
157 |
|
|
158 |
// Specify what should happen when it finishes loading |
// Specify what should happen when it finishes loading |
159 |
xmldoc.onload = function() { handler(xmldoc, url, data, result_handler); } |
xmldoc.onload = function() { handler(xmldoc, url, data, result_handler); } |
168 |
// Something about not following standards once again |
// Something about not following standards once again |
169 |
else if (window.ActiveXObject) |
else if (window.ActiveXObject) |
170 |
{ |
{ |
171 |
//var xmldoc = new ActiveXObject("MSXML2.DOMDocument"); // Create doc. |
xmldoc = new ActiveXObject("Microsoft.XMLDOM"); // Create doc. |
172 |
var xmldoc = new ActiveXObject("Microsoft.XMLDOM"); // Create doc. |
if (! xmldoc) xmldoc = new ActiveXObject("MSXML2.DOMDocument"); // Create doc. |
173 |
// Specify onload |
// Specify onload |
174 |
xmldoc.onreadystatechange = function() |
xmldoc.onreadystatechange = function() |
175 |
{ |
{ |