jackpf Posted May 10, 2009 Share Posted May 10, 2009 Good evening all, I'm implementing a new AJAX post system for my forum, and updating the content to show the new post by reloading the body. Eg, document.getElementsByTagName('body')[0].innerHTML = ajax.responseText; This works fine in all browsers except IE, which refuses to reload the body. I've tried updating the body to something else, like document.getElementsByTagName('body')[0].innerHTML = 'IE sucks'; And it works fine, so I think it's something to do with the AJAX part. I was just wondering if anyone else has experienced the same problem, or knows how to get around it? Cheers, Jack. Quote Link to comment https://forums.phpfreaks.com/topic/157606-solved-ie-and-ajax-responsetext/ Share on other sites More sharing options...
Ken2k7 Posted May 10, 2009 Share Posted May 10, 2009 No; I never had that problem. I just tested and it works for me. Quote Link to comment https://forums.phpfreaks.com/topic/157606-solved-ie-and-ajax-responsetext/#findComment-831132 Share on other sites More sharing options...
jackpf Posted May 10, 2009 Author Share Posted May 10, 2009 I think it might be something to do with the fact that I'm sending a header back... I don't think IE can understand it. I currently use error catching to hide all the stupid errors IE thinks exist, but I removed it, and got a "c00ce56e" error on the line that updates the body. Yeah, have you ever had a problem with headers, AJAX and IE? Quote Link to comment https://forums.phpfreaks.com/topic/157606-solved-ie-and-ajax-responsetext/#findComment-831180 Share on other sites More sharing options...
Ken2k7 Posted May 10, 2009 Share Posted May 10, 2009 PHP headers, no. AJAX headers, sometimes. Quote Link to comment https://forums.phpfreaks.com/topic/157606-solved-ie-and-ajax-responsetext/#findComment-831183 Share on other sites More sharing options...
jackpf Posted May 11, 2009 Author Share Posted May 11, 2009 Ahaa...I've found it. Apparently IE has some problem with updating innerHTML with ajax when a content-type header is sent. I hope IE dies soon... Quote Link to comment https://forums.phpfreaks.com/topic/157606-solved-ie-and-ajax-responsetext/#findComment-831874 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.