X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/2e847cf21b8ab9d15fa167b315ca5b2fa92638fc..ddde20c4d4ac6a8d53de079761155de813845b3c:/docs/output/Ext.Ajax.html diff --git a/docs/output/Ext.Ajax.html b/docs/output/Ext.Ajax.html index a9855684..1413553d 100644 --- a/docs/output/Ext.Ajax.html +++ b/docs/output/Ext.Ajax.html @@ -1,45 +1,45 @@ -
Observable
  Connection
    Ajax

Class Ext.Ajax

Package:Ext
Defined In:Connection.js
Class:Ajax
Extends:Connection

The global Ajax request class that provides a simple way to make Ajax requests -with maximum flexibility.

-

Since Ext.Ajax is a singleton, you can set common properties/events for it once -and override them at the request function level only if necessary.

-

Common Properties you may want to set are:

-
// Default headers to pass in every request

-Ext.Ajax.defaultHeaders = {
-    'Powered-By': 'Ext'
-};
-

-

Common Events you may want to set are:

-
// Example: show a spinner during all Ajax requests

-Ext.Ajax.on('beforerequest', this.showSpinner, this);
-Ext.Ajax.on('requestcomplete', this.hideSpinner, this);
-Ext.Ajax.on('requestexception', this.hideSpinner, this);
-

-

An example request:

-
// Basic request

-Ext.Ajax.request({
-   url: 'foo.php',
-   success: someFn,
-   failure: otherFn,
-   headers: {
-       'my-header': 'foo'
-   },
-   params: { foo: 'bar' }
-});
-
-// Simple ajax form submission

-Ext.Ajax.request({
-    form: 'some-form',
-    params: 'foo=bar'
-});
-



This class is a singleton and cannot be created directly.

Config Options

Config OptionsDefined By
 disableCachingParam : String
Change the parameter which is sent went disabling caching +
Observable
  Connection
    Ajax

Class Ext.Ajax

Package:Ext
Defined In:Connection.js
Class:Ajax
Extends:Connection

The global Ajax request class that provides a simple way to make Ajax requests +with maximum flexibility.

+

Since Ext.Ajax is a singleton, you can set common properties/events for it once +and override them at the request function level only if necessary.

+

Common Properties you may want to set are:

+
// Default headers to pass in every request
+Ext.Ajax.defaultHeaders = {
+    'Powered-By': 'Ext'
+};
+

+

Common Events you may want to set are:

+
// Example: show a spinner during all Ajax requests
+Ext.Ajax.on('beforerequest', this.showSpinner, this);
+Ext.Ajax.on('requestcomplete', this.hideSpinner, this);
+Ext.Ajax.on('requestexception', this.hideSpinner, this);
+

+

An example request:

+
// Basic request
+Ext.Ajax.request({
+   url: 'foo.php',
+   success: someFn,
+   failure: otherFn,
+   headers: {
+       'my-header': 'foo'
+   },
+   params: { foo: 'bar' }
+});
+
+// Simple ajax form submission
+Ext.Ajax.request({
+    form: 'some-form',
+    params: 'foo=bar'
+});
+



This class is a singleton and cannot be created directly.

Config Options

Config OptionsDefined By
 disableCachingParam : String
Change the parameter which is sent went disabling caching through a cache buster. Defaults to '_dc'
Connection

Public Properties

PropertyDefined By
 autoAbort : Boolean
Whether a new request should abort any pending requests. (defaults to false)
Ajax
 defaultHeaders : Object
An object containing request headers which are added to each request made by this object -(defaults to undefined).
Ajax
 disableCaching : Boolean
True to add a unique cache-buster param to GET requests. (defaults to true)
Ajax
 timeout : Number
The timeout in milliseconds to be used for requests. (defaults to 30000)
Ajax

Public Properties

PropertyDefined By
 autoAbort : Boolean
Whether a new request should abort any pending requests. (defaults to false)
Ajax
 defaultHeaders : Object
An object containing request headers which are added to each request made by this object +(defaults to undefined).
Ajax
 disableCaching : Boolean
True to add a unique cache-buster param to GET requests. (defaults to true)
Ajax
 timeout : Number
The timeout in milliseconds to be used for requests. (defaults to 30000)
Ajax

Public Methods

MethodDefined By
\ No newline at end of file