Results 1 to 9 of 9

Thread: Ajax turkish character IE6 Problem !!!help me

  1. #1
    Join Date
    Nov 2006
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Ajax turkish character IE6 Problem !!!help me

    My language is turkish.But it is not work in ie6 ajax.I search goole and I found this code ('text/xml; charset=iso-8859-9')
    and add .js file ıt works firefox very well but don't work ie6.Please help me


    Code:
    /*
    * Based on Ajax Ticker script (txt file source) (c) Dynamic Drive (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit http://www.dynamicdrive.com/ for this script and 100s more.
    */
    var loadingMessage = "Loading news...";
    var fetchErrorMessage = "Error loading data...";
    var pauseWhenMouseOver = false;
    var containerCSSclass = "udc_item";
    
    function getAJAX() {
      var httprequest=false
      if (window.XMLHttpRequest) { 
        httprequest = new XMLHttpRequest();
        if (httprequest.overrideMimeType) {
          httprequest.overrideMimeType('text/xml; charset=iso-8859-9')
        }
      } else if (window.ActiveXObject) { 
        try {
          httprequest = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
          try {
            httprequest = new ActiveXObject("Microsoft.XMLHTTP");
          } catch (e) {
          }
        }
      }
      return httprequest;
    }
    
    function udcajaxfader (txtfile, divId, divClass, delay, fadeornot) {
      this.txtfile = txtfile ;
      this.tickerid = divId;
      this.delay = delay;
      this.isMouseOver = 0;
      this.pointer = 0;
      this.opacitystring = (typeof fadeornot != "undefined") ? "width:100%;opacity: 1;-moz-opacity:1;filter:progid:DXImageTransform.Microsoft.alpha(opacity=100);" : "";
      if (this.opacitystring != "") {
        this.delay += 500;
      }
      this.opacitysetting = 0.2;
      this.news = [];
      this.ajaxobj = getAJAX()
      document.write('<div id="'+divId+'" class="'+divClass+'"><div style="'+this.opacitystring+'">' + loadingMessage + '</div></div>')
      this.getXMLfile()
    }
    
    udcajaxfader.prototype.getXMLfile = function() {
      if (this.ajaxobj) {
        var instanceOfTicker = this;
        var url = this.txtfile + "?time=" + new Date().getTime();
        this.ajaxobj.onreadystatechange =function() {
          instanceOfTicker.initialize();
        }
        this.ajaxobj.open('GET', url, true);
        this.ajaxobj.send(null);
      }
    }
    
    udcajaxfader.prototype.initialize=function() {
      if (this.ajaxobj.readyState == 4) {
        if (this.ajaxobj.status==200 
          || window.location.href.indexOf("http") == -1) {
          this.contentdiv = document.getElementById(this.tickerid).firstChild;
          var xmldata=this.ajaxobj.responseText;
          this.contentdiv.style.display = "none";
          this.contentdiv.innerHTML = xmldata;
          if (this.contentdiv.getElementsByTagName("div").length==0) {
            this.contentdiv.innerHTML = fetchErrorMessage;
            return;
          }
          var instanceOfTicker = this;
          document.getElementById(this.tickerid).onmouseover = function(){
            instanceOfTicker.isMouseOver=1;
          }
          document.getElementById(this.tickerid).onmouseout = function() {
            instanceOfTicker.isMouseOver=0;
          }
          if (window.attachEvent) {
            window.attachEvent("onunload", function() { 
              instanceOfTicker.contentdiv = instanceOfTicker.ajaxobj=null;
            });
          }
          for (var i=0; i < this.contentdiv.getElementsByTagName("div").length; i++) {
            if (this.contentdiv.getElementsByTagName("div")[i].className == containerCSSclass) { // CSS class
              this.news[this.news.length] = this.contentdiv.getElementsByTagName("div")[i].innerHTML;
            }
          }
          this.contentdiv.innerHTML = "";
          this.contentdiv.style.display = "block";
          this.rotatemsg();
          //setTimeout("this.getXMLfile()", 10000);
        }
      }
    }
    
    udcajaxfader.prototype.rotatemsg = function() {
      var instanceOfTicker = this;
      if (this.isMouseOver == 1 && pauseWhenMouseOver) {
        setTimeout(function() { 
          instanceOfTicker.rotatemsg()
        }, 100);
      } else {
        this.fadetransition("reset");
        this.contentdiv.innerHTML = this.news[this.pointer];
        this.fadetimer1 = setInterval(function() { 
          instanceOfTicker.fadetransition('up', 'fadetimer1')
        }, 100);
        this.pointer=(this.pointer<this.news.length-1)? this.pointer+1 : 0
        setTimeout(function() {
          instanceOfTicker.rotatemsg();
        }, this.delay);
      }
    }
    
    udcajaxfader.prototype.fadetransition = function(fadetype, timerid) {
      var contentdiv=this.contentdiv;
      if (fadetype=="reset") {
        this.opacitysetting = 0.2;
      }
      if (contentdiv.filters && contentdiv.filters[0]) {
        if (typeof contentdiv.filters[0].opacity == "number") {
          contentdiv.filters[0].opacity = this.opacitysetting*100;
        } else {
          contentdiv.style.filter="alpha(opacity="+this.opacitysetting*100+")";
        }
      } else if (typeof contentdiv.style.MozOpacity != "undefined" && this.opacitystring != "") {
        contentdiv.style.MozOpacity = this.opacitysetting;
      } else {
        this.opacitysetting = 1;
      }
      if (fadetype=="up") {
        this.opacitysetting += 0.1;
      }
      if (fadetype=="up" && this.opacitysetting>=1) {
        clearInterval(this[timerid]);
      }
    }
    and php file in attachment

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Nov 2006
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have fixed it!

    Thank you for your help!

    I use XAMPP

    Solution:
    I put
    "AddDefaultCharset iso-8859-1"
    in httpd-languages.conf
    But where is httpd-languages.conf ?

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I suppose that would depend on your server configuration, even whether or not you have the file. I'm not really sure.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Nov 2006
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    this is module for joomla.
    how solved my problem please help
    I am bad english sorry

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    httprequest.overrideMimeType isn't available in all browsers.

    This solution:

    I have fixed it!

    Thank you for your help!

    I use XAMPP

    Solution:
    I put
    "AddDefaultCharset iso-8859-1"
    in httpd-languages.conf
    worked for that particular server because the webmaster also owned the server, and because that is how his particular server worked.

    Do you own your server? If not, does your host permit you to use .htaccess?

    Quote Originally Posted by jscheuer1 View Post
    Even though you have the correct encoding on your page, when the server serves the Ajax content, it's using its (the server's) default encoding. There are various ways to change that, for a page, a site, or an entire server. If you have permission to use .htaccess on your host, that is often the easiest method to use for a page, directory, or site. If you own the server, you can change its configuration.
    There are other methods besides directly configuring the server, or using the .htaccess (for Apache only).

    Resources:

    http://www.askapache.com/htaccess/se...-htaccess.html

    http://dev.mobi/node/207
    Last edited by jscheuer1; 10-13-2007 at 02:29 PM. Reason: add info
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Nov 2006
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Code:
    AddDefaultCharset UTF-8
    AddCharset UTF-8 .xhtml 
    AddType 'text/html; charset=UTF-8' html
    I add this codes.But don't change anything.Please help

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Well, I thought you wanted:

    charset=iso-8859-9
    So I think it would be:

    Code:
    AddDefaultCharset iso-8859-9
    AddCharset iso-8859-9 .xhtml 
    AddType 'text/html; charset=iso-8859-9' html
    However, this would need to go in the right place and with sufficient permission from the server. Where did you put it?

    Also, it looks like you are mixing xhtml and html. Pick the one you are using and stick to that.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #9
    Join Date
    Nov 2006
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thank you so much.ıt is working.Have a good day

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •