How to Use Ext. Ajax

Source: Internet
Author: User

How to Use Ext. Ajax
Ext. Ajax. request ({// ajax request
Url: 'account/SysArea/InsertRoot ', // request URL
Params: record. data. attributes, // list of parameters
Success: function (response) {// callback function after successful operation


Var _ o = Ext. decode (response. responseText); // parse

}

});

 

The following are some attributes and Methods

 

Config optionsExt. data. Connection
View source cors: Boolean 'true' indicates that CORS support for XHR objects is enabled (Cross-Origin Resource Sharing)... Ext. data. Connection
View source disableCachingParam: String when the request cache is disabled by append parameters, the append parameter name... Ext. util. Observable
View source listeners: A Configuration Object of the Object. It contains one or more event processing functions and is added to the Object during Object initialization. ... Ext. data. Connection
View source withCredentials: Boolean when this parameter is set to 'true', The XHR object attribute withCredentials = true... Defined ByPropertiesExt. Ajax is set.
View source autoAbort: Specifies whether a new Boolean request interrupts all incomplete requests. ... Ext. Ajax
View source defaultHeaders: Object

An object that contains the request header information will be added to each request sent using the current object.

Ext. Ajax
View source disableCaching: Boolean

If it is true, a cache-buster (cache killer) will be added to the GET request ). The default value is true.

Ext. Ajax
View source extraParams: an Object with a property value, used to add additional parameters to each request sent using the current Object. ... Ext. util. Observable
View source hasListeners: ObjectREADONLY this object contains keys for any event with a listener. Listeners can be set directly on the instance, in its class or parent class (through observe), or on the MVC EventBus. The value of this object is true (a non-zero number) and false (0 or undefined ). They do not mean the exact listening... Ext. util. Observable
View source isObservable: Boolean is set to true in this class to identify an object as an instantiated Observable or its subclass. ... Ext. Ajax
View source method: String

The default HTTP request method. Note that this configuration item is case sensitive and all letters should be in uppercase. (If you have not set this configuration item but there is a request parameter, it will be used.POSTOtherwiseGET.).

Ext. Ajax
View source timeout: Number

The request timeout time, in milliseconds. The default value is 30000.

Ext. Ajax
View source url: the default URL used by String to send requests to the server. ... Defined ByMethodsExt. data. Connection
View source abort ([Object request]) interrupts an ongoing request... Ext. data. Connection
View source abortAll () interrupts all ongoing requests... Ext. util. Observable
View source addEvents (Object/String... eventNames) to add the specified event to the list of events that this Observable may trigger. ... Ext. util. Observable
View source addListener (String/Object eventName, [Function fn], [Object scope], [Object options]) adds an event processing Function to this Object, for example, myGridPanel. on (mouseover, this. onMouseOver, this); this method can also pass a single parameter, which is a configuration object that contains the attributes of multiple specified events. Example:... Ext. util. Observable
View source addManagedListener (Ext. util. observable/Ext. element item, Object/String ename, Function fn, Object scope, Object opt) to any Observable Object (or Ext. add a listener. When the component is destroyed, the listener is automatically removed... ext. util. observable
View source clearListeners () removes all listeners of this object, including managed listeners... Ext. util. Observable
View source clearManagedListeners () removes all managed listeners of this object... Ext. util. Observable
View source enableBubble (String/String [] eventNames) by calling this. getBubbleTarget () (if any) allows the events triggered by this Observable object to bubble along the inheritance system without implementation classes in the Observable base class. ... Ext. util. Observable
View source fireEvent (String eventName, Object... args): Boolean triggers a specified event using the passed parameter (removing the event name and adding the options Object passed to addListener. ... Ext. util. Observable
View source hasListener (String eventName): Boolean checks whether the object has a listener for a specific event or whether the event is blister. ... Ext. data. Connection
View source isLoading ([Object request]): Boolean determines whether the request status is incomplete... Ext. util. Observable
View source mon (Ext. util. observable/Ext. element item, Object/String ename, Function fn, Object scope, Object opt) shorthand for addManagedListener to any Observable Object (or Ext. add a listener. When the component is destroyed, the listener is automatically removed... ext. util. observable
View source mun (Ext. util. Observable/Ext. Element item, Object/String ename, Function fn, Object scope) the abbreviated method of removeManagedListener removes the listener added through the mon method. ... Ext. util. Observable
View source on (String/Object eventName, [Function fn], [Object scope], [Object options]) addListener short-cut method adds an event processing Function to this Object, for example: myGridPanel. on (mouseover, this. onMouseOver, this); this method also allows passing a single parameter, which contains the specified... ext. data. connection
View source parseStatus (Number status): the Object determines whether the response status is successful... Ext. util. Observable
View source relayEvents (Object origin, String [] events, [String prefix]) takes over the selected event from the specified Observable, as if the event was triggered by this. ... Ext. util. Observable
View source removeListener (String eventName, Function fn, Object scope) removes event handlers. ... Ext. util. Observable
View source removeManagedListener (Ext. util. Observable/Ext. Element item, Object/String ename, Function fn, Object scope) removes listeners added using the mon method. ... Ext. data. Connection
View source request (Object options): the Object sends an HTTP request to a remote server... Ext. util. Observable
View source resumeEvents () trigger of the continue event (see suspendEvents ). ... Ext. data. Connection
View source setOptions (Object options, Object scope): Object sets various parameters for the request, such as url and params... Ext. util. Observable
View source suspendEvents (Boolean queuesuincluded) Suspends all event triggers. (See resumeEvents)... Ext. util. Observable
View source un (String eventName, Function fn, Object scope) removeListener short method to remove the event handler. ... Ext. data. Connection
View source upload (String/HTMLElement/Ext. Element form, String url, String params, Object options) Use a hidden iframe to upload form... Defined ByEventsExt. data. Connection
View source beforerequest (Ext. data. Connection conn, Object options, Object eOpts) triggers this event before the network request of a data Object is sent... Ext. data. Connection
View source requestcomplete (Ext. data. Connection conn, Object response, Object options, Object eOpts) triggers this event when a request is successful... Ext. data. Connection
View source requestexception (Ext. data. Connection conn, Object response, Object options, Object eOpts) triggers this event when the server returns an HTTP Error status value ....

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.