0 Replies Latest reply on Aug 7, 2007 9:48 AM by Alex_Nest

    Problem with data loading

    Alex_Nest
      I need to load text data from server and use this:

      function DataFile(u) {
      if (u != null) {
      System.useCodepage = u;
      }
      }
      var o = DataFile.prototype;
      o.load = XML.prototype.load;
      o.getBytesTotal = function() {
      return (this._bytesTotal);
      };
      o.getBytesLoaded = function() {
      return (this._bytesLoaded);
      };
      o.onLoad = function() {
      };
      o.onData = function(src) {
      this.loaded = (src != null);
      this.content = src;
      this.onLoad(this.loaded);
      };
      o.toString = function() {
      return (this.content);
      };
      delete o;

      After this in my code I'm loading data in this way:

      file = new DataFile(true);
      file.onLoad = function(ok) {
      if (ok) {
      trace("success");
      } else {
      trace("failure");
      }
      };
      file.load(fileName);

      fileName - it is my url

      Problem is in next: in Mozilla 2.0.0.3 I've got message "success", but in IE 6 - "failure". Can anybody help me and explain why so differences? Thanks.