Solution Technologies
Управление сайтом без ограничений
{**
 * XS2:
 *
 * This file is developed by Solutecs, LLC for the purpose of the company
 * and is provided together with XS2 Framework as and inherent part of the
 * system. This file can be used on the terms of License Agreement.
 *
 * +7 (495) 585-0833 / 13 Rusakovskaya street, Moscow 107140 Russia
 *
 * @link http://www.solutecs.com
 * @copyright ©1998-2007 Solutecs, LLC
 * @version 1.XX
 *}



{literal}

function XS2AJAX() { this._construct() }
(function() {

  XS2AJAX.prototype = {

    onreadystatechange: null,
    responseJS: null,
    jshttprequest: null,
    caching: false,
    loader: null,
    method: 'POST',

    _construct: function() {
      this.jshttprequest = new JsHttpRequest();
    },

    send: function(param,url) {
      var th = this;
      var req = this.jshttprequest;

      if(param.elements) {
        param = {'form':param};
      }

      req.onreadystatechange = function() {
        if(4==req.readyState && "undefined"!=typeof(req.responseJS)) {
          th.responseText = req.responseText;
          th.responseJS = req.responseJS;
          th.onready();
        }
      }

      req.caching = this.caching;
      if (this.loader!=null) {
        req.loader = this.loader;
      }
      req.open(this.method, url, true);
      req.send(param);
    },

    sendForm: function(f,url) {
      if (f.elements) {
        var param = new Object();
        for (var i=0; i<f.elements.length; i++) {
          param[f.elements[i].name] = f.elements[i].value;
        }
        this.send(param,url);
      }
    }

  }

})();

{/literal}
Copyright ©1998-2008 Солютекс. Все права защищены.
Этот сайт сделан в designLab | Работает на технологии XS2
Условия использования | О защите конфиденциальности