jestep
Apr 25th 2006, 3:58 pm
Here's the problem.
I have a simple Ajax script and I need to get the script to display any returned data (html data) as html. Firefox has no problem with it, but IE only display's text.
Here's what the script returns:
function handleHttpResponse() {
if (http.readyState == 4) {
results = http.responseText;
if (document.getElementById){
document.getElementById('text').innerHTML = results;
} else if (document.all) {
document.all("text").innerHTML = results;
} else if (document.layers){
document.layers['text'].document.open();
document.layers['text'].document.write(results);
document.layers['text'].document.close();
document.layers['text'].visibility = 'show';
}
}
}
I have a simple Ajax script and I need to get the script to display any returned data (html data) as html. Firefox has no problem with it, but IE only display's text.
Here's what the script returns:
function handleHttpResponse() {
if (http.readyState == 4) {
results = http.responseText;
if (document.getElementById){
document.getElementById('text').innerHTML = results;
} else if (document.all) {
document.all("text").innerHTML = results;
} else if (document.layers){
document.layers['text'].document.open();
document.layers['text'].document.write(results);
document.layers['text'].document.close();
document.layers['text'].visibility = 'show';
}
}
}