6 var __jsonopensrfreqid = 1;
7 var __jsonopensrfreq_hash = {};
9 function JSONOpenSRFRequest () {
10 // Cache this for later ...
11 this._hash_id = __jsonopensrfreqid;
15 JSONOpenSRFRequest.method('open',function (service, method, async) {
16 this._service = service;
17 this._service = method;
18 this._async = (async ? 1 : 0);
21 JSONOpenSRFRequest.method('send', function () {
23 __jsonopensrfreq_hash['id' + this._hash_id] = {};
26 _OILS_FUNC_jsonopensrfrequest_send(this._hash_id,this._service,this._method,this._async,js2JSON(arguments));
28 alert("Sorry, no JSONOpenSRFRequest support");
31 this.responseText = __jsonopensrfreq_hash['id' + this._hash_id].responseText;
32 this.readyState = __jsonopensrfreq_hash['id' + this._hash_id].readyState;
33 this.status = __jsonopensrfreq_hash['id' + this._hash_id].status;
34 this.statusText = __jsonopensrfreq_hash['id' + this._hash_id].statusText;
35 this.responseJSON = JSON2js(this.responseText);
38 this.onreadystatechange();