In all browsers Mozila, Yandex, Chrome, Vivaldi. Everything works stably, but in IE, the error crashes:

"The object does not support this property or method"

on the line:

req.responseType = 'arraybuffer'; 

I can not understand why, below I bring a piece of code:

 function getXmlHttp() { var xmlhttp try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e1) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { xmlhttp = new XMLHttpRequest(); } return xmlhttp; } function ask_values() { req = getXmlHttp(); req.open('POST', 'GetChart.cgi?', true); req.responseType = 'arraybuffer'; //req.responseType = 'blob'; req.onreadystatechange = updatePage; req.send(time*16); } 

Thank you in advance.

  • add the function getXmlHttp() - Grundy
  • and what getXmlHttp(); returns getXmlHttp(); ? - Vasily Barbashev
  • @Grundy with a difference of 2 seconds: D - Vasily Barbashev
  • @ Vasily Barbashev, I also managed to edit - Grundy
  • one
    The problem with this function is that for the IE family, the choice is made towards ActiveX even if XMLHttpRequest already implemented, and, as can be seen from the question, some of the features of these objects are different. - Grundy

0