- |
-
-
- Updater.updateElement( Mixed el , String url , [String/Object params ], [Object options ] ) : void
- Deprecated. <static> Static convenience method. This method is deprecated in favor of el.load({url:'foo.php', ....
-
- Deprecated. <static> Static convenience method. This method is deprecated in favor of el.load({url:'foo.php', ...}).
+}); Config Options|
| listeners : ObjectA config object containing one or more event handlers to be added to this
+object during initialization. This should ... A config object containing one or more event handlers to be added to this
+object during initialization. This should be a valid listeners config object as specified in the
+addListener example for attaching multiple handlers at once.
+ DOM events from ExtJs Components
+ While some ExtJs Component classes export selected DOM events (e.g. "click", "mouseover" etc), this
+is usually only done when extra value can be added. For example the DataView's
+click event passing the node clicked on. To access DOM
+events directly from a Component's HTMLElement, listeners must be added to the Element after the Component
+has been rendered. A plugin can simplify this step: // Plugin is configured with a listeners config object.
+// The Component is appended to the argument list of all handler functions.
+Ext.DomObserver = Ext.extend(Object, {
+ constructor: function(config) {
+ this.listeners = config.listeners ? config.listeners : config;
+ },
+
+ // Component passes itself into plugin's init method
+ init: function(c) {
+ var p, l = this.listeners;
+ for (p in l) {
+ if (Ext.isFunction(l[p])) {
+ l[p] = this.createHandler(l[p], c);
+ } else {
+ l[p].fn = this.createHandler(l[p].fn, c);
+ }
+ }
+
+ // Add the listeners to the Element immediately following the render call
+ c.render = c.render.createSequence(function() {
+ var e = c.getEl();
+ if (e) {
+ e.on(l);
+ }
+ });
+ },
+
+ createHandler: function(fn, c) {
+ return function(e) {
+ fn.call(this, e, c);
+ };
+ }
+});
+
+var combo = new Ext.form.ComboBox({
+
+ // Collapse combo when its element is clicked on
+ plugins: [ new Ext.DomObserver({
+ click: function(evt, comp) {
+ comp.collapse();
+ }
+ })],
+ store: myStore,
+ typeAhead: true,
+ mode: 'local',
+ triggerAction: 'all'
+});
| Observable |
Public Properties|
| defaultUrl : String Cached url to use for refreshes. Overwritten every time update() is called unless "discardUrl" param is set to true. | Updater | | disableCaching : BooleanWhether to append unique parameter on get request to disable caching (defaults to Ext.Updater.defaults.disableCaching... | Updater | | el : Ext.Element The Element object | Updater | | formUpdateDelegate : FunctionDelegate for formUpdate() prebound to "this", use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind arg... Delegate for formUpdate() prebound to "this", use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind arguments | Updater | | indicatorText : String | Updater | | loadScripts : Boolean | Updater | | refreshDelegate : Function Delegate for refresh() prebound to "this", use myUpdater.refreshDelegate.createCallback(arg1, arg2) to bind arguments | Updater | | renderer : Object | Updater | | showLoadIndicator : String | Updater | | sslBlankUrl : String | Updater | | timeout : Number | Updater | | transaction : Object Transaction object of the current executing transaction, or null if there is no active transaction. | Updater | | updateDelegate : Function Delegate for update() prebound to "this", use myUpdater.updateDelegate.createCallback(arg1, arg2) to bind arguments | Updater |
Public Methods|
| Updater( Mixed el , [Boolean forceNew ] )
+ Create new Updater directly. Create new Updater directly. | Updater | | Updater.updateElement( Mixed el , String url , [String/Object params ], [Object options ] )
+ :
+ void<static> Static convenience method. This method is deprecated in favor of el.load({url:'foo.php', ...}).
+Usage:
+Ext.Updater.up... <static> Static convenience method. This method is deprecated in favor of el.load({url:'foo.php', ...}).
Usage:
- Ext.Updater.updateElement("my-div", "stuff.php");
- Parameters:
- el : MixedThe element to update url : StringThe url params : String/Object(optional) Url encoded param string or an object of name/value pairs options : Object(optional) A config object with any of the Updater properties you want to set - for
-example: {disableCaching:true, indicatorText: "Loading data..."}
- Returns:
-
-
-
-
- |
- Updater |
-
-
- |
-
-
- abort() : void
- Aborts the currently executing transaction, if any.
-
- Aborts the currently executing transaction, if any.
- Parameters:
-
- Returns:
-
-
-
-
- |
- Updater |
-
-
- |
-
-
- addEvents( Object object ) : void
- Used to define events on this Observable
-
- Used to define events on this Observable
- Parameters:
-
- Returns:
-
-
-
-
- |
- Observable |
-
-
- |
-
-
- addListener( String eventName , Function handler , [Object scope ], [Object options ] ) : void
- Appends an event handler to this component
-
- Appends an event handler to this component
- Parameters:
- eventName : StringThe type of event to listen for handler : FunctionThe method the event invokes scope : Object(optional) The scope in which to execute the handler
-function. The handler function's "this" context. options : Object(optional) An object containing handler configuration
+ Ext.Updater.updateElement("my-div", "stuff.php");
Parameters:el : MixedThe element to update url : StringThe url params : String/Object(optional) Url encoded param string or an object of name/value pairs options : Object(optional) A config object with any of the Updater properties you want to set - for
+example: {disableCaching:true, indicatorText: "Loading data..."} Returns:
| Updater | | abort()
+ :
+ voidAborts the currently executing transaction, if any. Aborts the currently executing transaction, if any. | Updater | | addEvents( Object|String o , string Optional. )
+ :
+ voidAdds the specified events to the list of events which this Observable may fire. Adds the specified events to the list of events which this Observable may fire. | Observable | | addListener( String eventName , Function handler , [Object scope ], [Object options ] )
+ :
+ voidAppends an event handler to this object. Appends an event handler to this object. Parameters:eventName : StringThe name of the event to listen for. handler : FunctionThe method the event invokes. scope : Object(optional) The scope (this reference) in which the handler function is executed.
+If omitted, defaults to the object which fired the event. options : Object(optional) An object containing handler configuration.
properties. This may contain any of the following properties:
-- scope : Object
The scope in which to execute the handler function. The handler function's "this" context.
-- delay : Number
The number of milliseconds to delay the invocation of the handler after the event fires.
-- single : Boolean
True to add a handler to handle just the next firing of the event, and then remove itself.
-- buffer : Number
Causes the handler to be scheduled to run in an Ext.util.DelayedTask delayed
+ - scope : Object
The scope (this reference) in which the handler function is executed.
+If omitted, defaults to the object which fired the event.
+- delay : Number
The number of milliseconds to delay the invocation of the handler after the event fires.
+- single : Boolean
True to add a handler to handle just the next firing of the event, and then remove itself.
+- buffer : Number
Causes the handler to be scheduled to run in an Ext.util.DelayedTask delayed
by the specified number of milliseconds. If the event fires again within that time, the original
-handler is not invoked, but the new handler is scheduled in its place.
+handler is not invoked, but the new handler is scheduled in its place.
+- target : Observable
Only call the handler if the event was fired on the target Observable, not
+if the event was bubbled up from a child Observable.
Combining Options
Using the options argument, it is possible to combine different types of listeners:
-A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)
- el.on('click', this.onClick, this, {
- single: true,
- delay: 100,
- forumId: 4
+A delayed, one-time listener.
+myDataView.on('click', this.onClick, this, {
+single: true,
+delay: 100
});
Attaching multiple handlers in 1 call
The method also allows for a single argument to be passed which is a config object containing properties
which specify multiple handlers.
- foo.on({
- 'click' : {
- fn: this.onClick,
- scope: this,
- delay: 100
- },
- 'mouseover' : {
- fn: this.onMouseOver,
- scope: this
- },
- 'mouseout' : {
- fn: this.onMouseOut,
- scope: this
- }
+myGridPanel.on({
+'click' : {
+ fn: this.onClick,
+ scope: this,
+ delay: 100
+},
+'mouseover' : {
+ fn: this.onMouseOver,
+ scope: this
+},
+'mouseout' : {
+ fn: this.onMouseOut,
+ scope: this
+}
});
Or a shorthand syntax:
- foo.on({
- 'click' : this.onClick,
- 'mouseover' : this.onMouseOver,
- 'mouseout' : this.onMouseOut,
- scope: this
-});
- Returns:
-
-
-
-
- |
- Observable |
-
-
- |
-
-
- fireEvent( String eventName , Object... args ) : Boolean
- Fires the specified event with the passed parameters (minus the event name).
-
- Fires the specified event with the passed parameters (minus the event name).
- Parameters:
-
- Returns:
-
-
-
-
- |
- Observable |
-
-
- |
-
-
- formUpdate( String/HTMLElement form , [String url ], [Boolean reset ], [Function callback ] ) : void
- Performs an async form post, updating this element with the response. If the form has the attribute
-enctype="multipar...
-
- Performs an async form post, updating this element with the response. If the form has the attribute
+ myGridPanel.on({
+'click' : this.onClick,
+'mouseover' : this.onMouseOver,
+'mouseout' : this.onMouseOut,
+ scope: this
+});
Returns: | Observable | | enableBubble( Object events )
+ :
+ voidEnables events fired by this Observable to bubble up an owner hierarchy by calling
+this.getBubbleTarget() if present... Enables events fired by this Observable to bubble up an owner hierarchy by calling
+this.getBubbleTarget() if present. There is no implementation in the Observable base class.
+ This is commonly used by Ext.Components to bubble events to owner Containers. See Ext.Component.getBubbleTarget. The default
+implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to
+access the required target more quickly.
+ Example: Ext.override(Ext.form.Field, {
+// Add functionality to Field's initComponent to enable the change event to bubble
+ initComponent: Ext.form.Field.prototype.initComponent.createSequence(function() {
+ this.enableBubble('change');
+ }),
+
+// We know that we want Field's events to bubble directly to the FormPanel.
+ getBubbleTarget: function() {
+ if (!this.formPanel) {
+ this.formPanel = this.findParentByType('form');
+ }
+ return this.formPanel;
+ }
+});
+
+var myForm = new Ext.formPanel({
+ title: 'User Details',
+ items: [{
+ ...
+ }],
+ listeners: {
+ change: function() {
+// Title goes red if form has been modified.
+ myForm.header.setStyle("color", "red");
+ }
+ }
+});
| Observable | | fireEvent( String eventName , Object... args )
+ :
+ BooleanFires the specified event with the passed parameters (minus the event name).
+An event may be set to bubble up an Obse... | Observable | | formUpdate( String/HTMLElement form , [String url ], [Boolean reset ], [Function callback ] )
+ :
+ voidPerforms an async form post, updating this element with the response. If the form has the attribute
+enctype="<a href=... Performs an async form post, updating this element with the response. If the form has the attribute
enctype="multipart/form-data", it assumes it's a file upload.
Uses this.sslBlankUrl for SSL file uploads to prevent IE security warning.
File uploads are not performed using normal "Ajax" techniques, that is they are not
@@ -393,430 +199,73 @@ to a dynamically generated, hidden <iframe> which is inserted into t
but removed after the return data has been gathered.
Be aware that file upload packets, sent with the content type multipart/form-data
and some server technologies (notably JEE) may require some custom processing in order to
-retrieve parameter names and parameter values from the packet content.
- Parameters:
- form : String/HTMLElementThe form Id or form element url : String(optional) The url to pass the form to. If omitted the action attribute on the form will be used. reset : Boolean(optional) Whether to try to reset the form after the update callback : Function(optional) Callback when transaction is complete. The following
+retrieve parameter names and parameter values from the packet content. Parameters:form : String/HTMLElementThe form Id or form element url : String(optional) The url to pass the form to. If omitted the action attribute on the form will be used. reset : Boolean(optional) Whether to try to reset the form after the update callback : Function(optional) Callback when transaction is complete. The following
parameters are passed:
- el : Ext.Element
The Element being updated.
- success : Boolean
True for success, false for failure.
-- response : XMLHttpRequest
The XMLHttpRequest which processed the update.
- Returns:
-
-
-
-
- |
- Updater |
-
-
- |
-
-
- getDefaultRenderer() : void
- This is an overrideable method which returns a reference to a default
-renderer class if none is specified when creati...
-
- This is an overrideable method which returns a reference to a default
+ response : XMLHttpRequestThe XMLHttpRequest which processed the update. Returns: | Updater | | getDefaultRenderer()
+ :
+ voidThis is an overrideable method which returns a reference to a default
+renderer class if none is specified when creati... This is an overrideable method which returns a reference to a default
renderer class if none is specified when creating the Ext.Updater.
-Defaults to Ext.Updater.BasicRenderer
- Parameters:
-
- Returns:
-
-
-
-
- |
- Updater |
-
-
- |
-
-
- getEl() : Ext.Element
- Get the Element this Updater is bound to
-
- Get the Element this Updater is bound to
- Parameters:
-
- Returns:
-
- Ext.Element The element
-
-
-
-
- |
- Updater |
-
-
- |
-
-
- getRenderer() : Object
- |
- Updater |
-
-
- |
-
-
- hasListener( String eventName ) : Boolean
- Checks to see if this object has any listeners for a specified event
-
- Checks to see if this object has any listeners for a specified event
- Parameters:
-
- Returns:
-
-
-
-
- |
- Observable |
-
-
- |
-
-
- isAutoRefreshing() : void
- Returns true if the Updater is currently set to auto refresh its content (see startAutoRefresh), otherwise false.
-
- Returns true if the Updater is currently set to auto refresh its content (see startAutoRefresh), otherwise false.
- Parameters:
-
- Returns:
-
-
-
-
- |
- Updater |
-
-
- |
-
-
- isUpdating() : Boolean
- Returns true if an update is in progress, otherwise false.
-
- Returns true if an update is in progress, otherwise false.
- Parameters:
-
- Returns:
-
-
-
-
- |
- Updater |
-
-
- |
-
-
- on( String eventName , Function handler , [Object scope ], [Object options ] ) : void
- Appends an event handler to this element (shorthand for addListener)
-
- Appends an event handler to this element (shorthand for addListener)
- Parameters:
- eventName : StringThe type of event to listen for handler : FunctionThe method the event invokes scope : Object(optional) The scope in which to execute the handler
-function. The handler function's "this" context. options : Object(optional)
- Returns:
-
-
-
-
- |
- Observable |
-
-
- |
-
-
- purgeListeners() : void
- Removes all listeners for this object
-
- Removes all listeners for this object
- Parameters:
-
- Returns:
-
-
-
-
- |
- Observable |
-
-
- |
-
-
- refresh( [Function callback ] ) : void
- Refresh the element with the last used url or defaultUrl. If there is no url, it returns immediately
-
- Refresh the element with the last used url or defaultUrl. If there is no url, it returns immediately
- Parameters:
-
- Returns:
-
-
-
-
- |
- Updater |
-
-
- |
-
-
- relayEvents( Object o , Array events ) : void
- Relays selected events from the specified Observable as if the events were fired by this.
-
- Relays selected events from the specified Observable as if the events were fired by this.
- Parameters:
-
- Returns:
-
-
-
-
- |
- Observable |
-
-
- |
-
-
- removeListener( String eventName , Function handler , [Object scope ] ) : void
- Removes a listener
-
- Removes a listener
- Parameters:
-
- Returns:
-
-
-
-
- |
- Observable |
-
-
- |
-
-
- resumeEvents() : void
-
-
- Resume firing events. (see suspendEvents)
- Parameters:
-
- Returns:
-
-
-
-
- |
- Observable |
-
-
- |
-
-
- setDefaultUrl( String/Function defaultUrl ) : void
- Sets the default URL used for updates.
-
- Sets the default URL used for updates.
- Parameters:
-
- Returns:
-
-
-
-
- |
- Updater |
-
-
- |
-
-
- setRenderer( Object renderer ) : void
- |
- Updater |
-
-
- |
-
-
- showLoading() : void
- Display the element's "loading" state. By default, the element is updated with indicatorText. This
-method may be over...
-
- Display the element's "loading" state. By default, the element is updated with indicatorText. This
-method may be overridden to perform a custom action while this Updater is actively updating its contents.
- Parameters:
-
- Returns:
-
-
-
-
- |
- Updater |
-
-
- |
-
-
- startAutoRefresh( Number interval , [String/Object/Function url ], [String/Object params ], [Function callback ], [Boolean refreshNow ] ) : void
- Set this element to auto refresh. Can be canceled by calling stopAutoRefresh.
-
- Set this element to auto refresh. Can be canceled by calling stopAutoRefresh. | Updater | | getEl()
+ :
+ Ext.ElementGet the Element this Updater is bound to Get the Element this Updater is bound to | Updater | | getRenderer()
+ :
+ ObjectReturns the current content renderer for this Updater. See Ext.Updater.BasicRenderer.render for more details. | Updater | | hasListener( String eventName )
+ :
+ BooleanChecks to see if this object has any listeners for a specified event Checks to see if this object has any listeners for a specified event | Observable | | isAutoRefreshing()
+ :
+ voidReturns true if the Updater is currently set to auto refresh its content (see startAutoRefresh), otherwise false. Returns true if the Updater is currently set to auto refresh its content (see startAutoRefresh), otherwise false. | Updater | | isUpdating()
+ :
+ BooleanReturns true if an update is in progress, otherwise false. Returns true if an update is in progress, otherwise false. | Updater | | on( String eventName , Function handler , [Object scope ], [Object options ] )
+ :
+ voidAppends an event handler to this object (shorthand for addListener.) Appends an event handler to this object (shorthand for addListener.) Parameters:eventName : StringThe type of event to listen for handler : FunctionThe method the event invokes scope : Object(optional) The scope (this reference) in which the handler function is executed.
+If omitted, defaults to the object which fired the event. options : Object(optional) An object containing handler configuration. Returns: | Observable | | purgeListeners()
+ :
+ voidRemoves all listeners for this object Removes all listeners for this object | Observable | | refresh( [Function callback ] )
+ :
+ voidRefresh the element with the last used url or defaultUrl. If there is no url, it returns immediately Refresh the element with the last used url or defaultUrl. If there is no url, it returns immediately | Updater | | relayEvents( Object o , Array events )
+ :
+ voidRelays selected events from the specified Observable as if the events were fired by this. Relays selected events from the specified Observable as if the events were fired by this. | Observable | | removeListener( String eventName , Function handler , [Object scope ] )
+ :
+ voidRemoves an event handler. Removes an event handler. | Observable | | resumeEvents()
+ :
+ voidResume firing events. (see suspendEvents)
+If events were suspended using the queueSuspended parameter, then all
+event... Resume firing events. (see suspendEvents)
+If events were suspended using the queueSuspended parameter, then all
+events fired during event suspension will be sent to any listeners now. | Observable | | setDefaultUrl( String/Function defaultUrl )
+ :
+ voidSets the default URL used for updates. Sets the default URL used for updates. | Updater | | setRenderer( Object renderer )
+ :
+ voidSets the content renderer for this Updater. See Ext.Updater.BasicRenderer.render for more details. | Updater | | showLoading()
+ :
+ voidDisplay the element's "loading" state. By default, the element is updated with indicatorText. This
+method may be over... Display the element's "loading" state. By default, the element is updated with indicatorText. This
+method may be overridden to perform a custom action while this Updater is actively updating its contents. | Updater | | startAutoRefresh( Number interval , [String/Object/Function url ], [String/Object params ], [Function callback ], [Boolean refreshNow ] )
+ :
+ voidSet this element to auto refresh. Can be canceled by calling stopAutoRefresh. Set this element to auto refresh. Can be canceled by calling stopAutoRefresh. Parameters:interval : NumberHow often to update (in seconds). url : String/Object/Function(optional) The url for this request, a config object in the same format
+supported by load, or a function to call to get the url (defaults to the last used url). Note that while
the url used in a load call can be reused by this method, other load config options will not be reused and must be
sepcified as part of a config object passed as this paramter if needed. params : String/Object(optional) The parameters to pass as either a url encoded string
-"¶m1=1¶m2=2" or as an object {param1: 1, param2: 2} callback : Function(optional) Callback when transaction is complete - called with signature (oElement, bSuccess) refreshNow : Boolean(optional) Whether to execute the refresh now, or wait the interval
- Returns:
-
-
-
-
- |
- Updater |
-
-
- |
-
-
- stopAutoRefresh() : void
- Stop auto refresh on this element.
-
- Stop auto refresh on this element.
- Parameters:
-
- Returns:
-
-
-
-
- |
- Updater |
-
-
- |
-
-
- suspendEvents() : void
-
-
- Suspend the firing of all events. (see resumeEvents)
- Parameters:
-
- Returns:
-
-
-
-
- |
- Observable |
-
-
- |
-
-
- un( String eventName , Function handler , [Object scope ] ) : void
- Removes a listener (shorthand for removeListener)
-
- Removes a listener (shorthand for removeListener)
- Parameters:
-
- Returns:
-
-
-
-
- |
- Observable |
-
-
- |
-
-
- update( Object options ) : void
- Performs an asynchronous request, updating this element with the response.
-If params are specified it uses POST, othe...
-
- Performs an asynchronous request, updating this element with the response.
+"¶m1=1¶m2=2" or as an object {param1: 1, param2: 2} callback : Function(optional) Callback when transaction is complete - called with signature (oElement, bSuccess) refreshNow : Boolean(optional) Whether to execute the refresh now, or wait the interval Returns: | Updater | | stopAutoRefresh()
+ :
+ voidStop auto refresh on this element. Stop auto refresh on this element. | Updater | | suspendEvents( Boolean queueSuspended )
+ :
+ voidSuspend the firing of all events. (see resumeEvents) Suspend the firing of all events. (see resumeEvents) Parameters:queueSuspended : BooleanPass as true to queue up suspended events to be fired
+after the resumeEvents call instead of discarding all suspended events; Returns: | Observable | | un( String eventName , Function handler , [Object scope ] )
+ :
+ voidRemoves an event handler (shorthand for removeListener.) | Observable | | update( Object options )
+ :
+ voidPerforms an asynchronous request, updating this element with the response.
+If params are specified it uses POST, othe... Performs an asynchronous request, updating this element with the response.
If params are specified it uses POST, otherwise it uses GET.
Note: Due to the asynchronous nature of remote server requests, the Element
will not have been fully updated when the function returns. To post-process the returned
-data, use the callback option, or an update event handler.
- Parameters:
- options : ObjectA config object containing any of the following options:
+data, use the callback option, or an update event handler.Parameters:options : ObjectA config object containing any of the following options:
- url : String/Function
The URL to request or a function which
-returns the URL (defaults to the value of Ext.Ajax.url if not specified).
+returns the URL (defaults to the value of Ext.Ajax.url if not specified).
- method : String
The HTTP method to
use. Defaults to POST if the params argument is present, otherwise GET.
- params : String/Object/Function
The
@@ -825,7 +274,7 @@ string, or as an object containing properties which represent parameters,
or as a function, which returns such an object.
- scripts : Boolean
If true
any <script> tags embedded in the response text will be extracted
-and executed (defaults to Ext.Updater.defaults.loadScripts). If this option is specified,
+and executed (defaults to Ext.Updater.defaults.loadScripts). If this option is specified,
the callback will be called after the execution of the scripts.
- callback : Function
A function to
be called when the response from the server arrives. The following
@@ -839,95 +288,32 @@ parameters are passed:
to execute the callback (The callback's this reference.) If the
params argument is a function, this scope is used for that function also.
- discardUrl : Boolean
By default, the URL of this request becomes
-the default URL for this Updater object, and will be subsequently used in refresh
-calls. To bypass this behavior, pass discardUrl:true (defaults to false).
+the default URL for this Updater object, and will be subsequently used in refresh
+calls. To bypass this behavior, pass discardUrl:true (defaults to false).
- timeout : Number
The number of seconds to wait for a response before
-timing out (defaults to Ext.Updater.defaults.timeout).
+timing out (defaults to Ext.Updater.defaults.timeout).
- text : String
The text to use as the innerHTML of the
-Ext.Updater.defaults.indicatorText div (defaults to 'Loading...'). To replace the entire div, not
-just the text, override Ext.Updater.defaults.indicatorText directly.
+Ext.Updater.defaults.indicatorText div (defaults to 'Loading...'). To replace the entire div, not
+just the text, override Ext.Updater.defaults.indicatorText directly.
- nocache : Boolean
Only needed for GET
requests, this option causes an extra, auto-generated parameter to be appended to the request
-to defeat caching (defaults to Ext.Updater.defaults.disableCaching).
+to defeat caching (defaults to Ext.Updater.defaults.disableCaching).
-For example:
- um.update({
- url: "your-url.php",
- params: {param1: "foo", param2: "bar"}, // or a URL encoded string
- callback: yourFunction,
- scope: yourObject, //(optional scope)
- discardUrl: true,
- nocache: true,
- text: "Loading...",
- timeout: 60,
- scripts: false // Save time by avoiding RegExp execution.
-});
- Returns:
-
-
-
-
- |
- Updater |
-
-
-
- Public Events
-
-
-
-
-
-
- |
-
-
- beforeupdate : ( Ext.Element el , String/Object/Function url , String/Object params )
- Fired before an update is made, return false from your handler and the update is cancelled.
-
- Fired before an update is made, return false from your handler and the update is cancelled.
- Listeners will be called with the following arguments:
- el : Ext.Elementurl : String/Object/Functionparams : String/Object
-
-
-
- |
- Updater |
-
-
- |
-
-
- failure : ( Ext.Element el , Object oResponseObject )
- Fired on update failure.
-
- Fired on update failure.
- Listeners will be called with the following arguments:
- el : Ext.ElementoResponseObject : ObjectThe response Object
-
-
-
- |
- Updater |
-
-
- |
-
-
- update : ( Ext.Element el , Object oResponseObject )
- Fired after successful update is made.
-
- Fired after successful update is made.
- Listeners will be called with the following arguments:
- el : Ext.ElementoResponseObject : ObjectThe response Object
-
-
-
- |
- Updater |
-
-
-
-
\ No newline at end of file
+For example:
+ um.update({
+ url: "your-url.php",
+ params: {param1: "foo", param2: "bar"}, // or a URL encoded string
+ callback: yourFunction,
+ scope: yourObject, //(optional scope)
+ discardUrl: true,
+ nocache: true,
+ text: "Loading...",
+ timeout: 60,
+ scripts: false // Save time by avoiding RegExp execution.
+ }); Returns: | Updater |