By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
463,095 Members | 483 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 463,095 IT Pros & Developers. It's quick & easy.

problems with ajax accents on ie

P: 35
i have set up a xhr , all the accents on the page are showed ok on ff an safari
Expand|Select|Wrap|Line Numbers
  1. function _cms() {
  2."GET", 'cms.php', true);
  3. cms.setRequestHeader('If-Modified-Since','Wed, 05 Apr 2006 00:00:00 GMT');
  4. if (cms.overrideMimeType) {
  5. cms.overrideMimeType('text/html; charset=ISO-8859-1')
  6.          }
  7. else{cms.setRequestHeader("Content-type", "text/html; charset=ISO-8859-1"); }
  8. cms.onreadystatechange = function() {
  9. if(cms.readyState == 1){loader();}
  10. if(cms.readyState == 4 && cms.status == 200){
  11. document.getElementById("body_").innerHTML = cms.responseText;
so i setup a if condition for the overrideMimeType method because ie dont recognize it and blocks the xhr then i set a else with a setRequestHeader thinking this one would handle the no showing accents on ie (french accents) but it still does not work on ie, any thoughts? regards.
Apr 1 '09 #1
Share this Question
Share on Google+
5 Replies

Expert Mod 15k+
P: 16,027
Set the header in the PHP file.
Apr 2 '09 #2

P: 35
the called file has the php extension but it's a normal html file so i cant do that
Apr 2 '09 #3

Expert Mod 15k+
P: 16,027
Try using meta tags to set the content type. Have you tried to load the page directly without Ajax?
Apr 2 '09 #4

P: 35
if the page is loaded without ajax the accents are ok, i am calling this page with the AHAH method(response text) so i cannot include a metatag in the called file(only in the calling file wich is the file that calls all the files),it is strange as the overridemymetype method works for ff and safari but i cannot find a else statement to make it work for ie
Apr 3 '09 #5

P: 2,476
Can you show me the error details?
And what 's exactly happening please tell me :)
I feared you didn't obtain XML HTTP Request for IE. Show me the code for obtaining XML HTTP Request.
Apr 4 '09 #6

Post your reply

Sign in to post your reply or Sign up for a free account.