472,142 Members | 1,065 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,142 software developers and data experts.

problems with ajax accents on ie

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. cms.open("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
5 3201
16,027 Expert Mod 8TB
Set the header in the PHP file.
Apr 2 '09 #2
the called file has the php extension but it's a normal html file so i cant do that
Apr 2 '09 #3
16,027 Expert Mod 8TB
Try using meta tags to set the content type. Have you tried to load the page directly without Ajax?
Apr 2 '09 #4
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
2,476 2GB
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.

Similar topics

5 posts views Thread by chepiok | last post: by
2 posts views Thread by c w | last post: by
reply views Thread by Wim Roffal | last post: by
2 posts views Thread by Ghislain Benrais | last post: by
13 posts views Thread by bussiere bussiere | last post: by
3 posts views Thread by bss | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.