I try to use ajax to encrease the speed of the page. But with IE7 and IE6 I encountered some problem.
First of all I try to fill a div tag with the innerHTML method, but with IE family it doesn't work.
I have to fill a div with something like "<p>This test show a text under a line in the div TAG</p>", with something like "TEST", everything working!So, as I read in some forum, the problem resides in the space character, passed ad responsetext from a php file.
I have this text as a response calling a php file, very easy, but if finally I got it, I can extend this procedure to a more complex page.
Httpobject is a XMLHTTPrequest object
tha page html is like:
..........omissis..........
[HTML]<div id="mydiv">
</div>[/HTML]
......omissis......
this is the javascript
...omissis....
Expand|Select|Wrap|Line Numbers
- d=document.getElementById('mydiv');
- d.innerHTML=httpObject.responseText;
and it's work with firefox and safari, but not in IE family browser
I also try this javascript:
.......omissis......
Expand|Select|Wrap|Line Numbers
- d=document.getElementById('mydiv');
- var text=document.createTextNode(httpObject.response);
- d.appendChild(text);
Please someone can help me to resolve this problem, I spend the last entire night on it, without any success :-(
thanks a lot in advance