Hi,
I have Web UI and I am reading value from file and displaying it on screen after some time interval thru javascript. Values are updaing properly in chrome but not in IE 8.0. Please suggest me what can be done for this?
Regds
SNI
PFB the code snippet
var xmlhttp;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
setInterval(loadFile,2000);
function loadFile()
{
var data = "";
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
var myval =function(xmlhttp.responseText,"MYVAL");
if(myval <0){
document.getElementById("rtHeader_val").src="images/LTE/1.png";
}
document.getElementById("myval_1").innerHTML=myFunction(xmlhttp.responseText,"MYVAL");
if(xmlhttp)
{
//myinfo is input file from which application reads the values
xmlhttp.open("GET","/config/myinfo",false);
xmlhttp.send();
data=xmlhttp.responseText;
}
}
This code updates value after 2 secs on chrome but not IE 8