X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/d41dc04ad17d1d9125fb2cf72db2b4782dbe3a8c..6a7e4474cba9d8be4b2ec445e10f1691f7277c50:/docs/output/Ext.Ajax.html diff --git a/docs/output/Ext.Ajax.html b/docs/output/Ext.Ajax.html index 6949a191..1413553d 100644 --- a/docs/output/Ext.Ajax.html +++ b/docs/output/Ext.Ajax.html @@ -1,26 +1,30 @@ -
-
- Properties - Methods - Events - Config Options - Direct Link -
-
-
Observable
-  Connection
-    Ajax
-

Class Ext.Ajax

- - - - - -
Package:Ext
Defined In:Connection.js
Class:Ajax
Extends:Connection
-
- Global Ajax request class. Provides a simple way to make Ajax requests with maximum flexibility. Example usage: +
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({
+Ext.Ajax.request({
    url: 'foo.php',
    success: someFn,
    failure: otherFn,
@@ -31,420 +35,215 @@ Ext.Ajax.request({
 });
 
 // Simple ajax form submission
-Ext.Ajax.request({
+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
\ No newline at end of file