I wanted to refresh whole div containing cfchart with updated chart using simple xmlHttpReq. I simply write another .cfm page having new charts with which i replace chart in my calling .cfm page. It worked fine in Firefox n safari, but i can’t see any updated chart in IE, whole div was blank. There was not even any java script error shown. Problem was that IE inserts tag at the top of html code. So all the html beneath that is not displayed in IE. Below code will solve that purpose.
All it does is replace any found in the xmlHttp.responseText
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState == 4 && xmlhttp.status==200)
{
var res = xmlhttp.responseText;
res = res.replace(new RegExp("[<||\>]","gi"),"");
document.getElementById("charts").innerHTML = res;
}
}





#1 by autoversicherung vergleich on 10/29/2010 - 7:59 AM
Quote
I had been arguing with my close friend on this issue for quite a while, base on your ideas prove that I am right, let me show him your webpage then I am sure it must make him buy me a drink, lol, thanks.
- Kris
#2 by dvaday on 11/03/2010 - 5:50 AM
Quote
Hey Kris,
I am sorry I cant give you that url as its not personal. But it true that IE inserts unwanted tags in you xmlhttprequest for cfcharts.