Performs an asynchronous 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
performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the
DOM <form>
element temporarily modified to have its
target set to refer
to a dynamically generated, hidden <iframe>
which is inserted into the document
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.
The Element being updated.
True for success, false for failure.
The XMLHttpRequest which processed the update.
update
event handler.The URL to request or a function which returns the URL (defaults to the value of Ext.Ajax.url if not specified).
The HTTP method to
use. Defaults to POST if the params
argument is present, otherwise GET.
The parameters to pass to the server (defaults to none). These may be specified as a url-encoded string, or as an object containing properties which represent parameters, or as a function, which returns such an object.
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,
the callback will be called after the execution of the scripts.
A function to be called when the response from the server arrives. The following parameters are passed:
The Element being updated.
True for success, false for failure.
The XMLHttpRequest which processed the update.
The config object passed to the update call.
The scope in which
to execute the callback (The callback's this
reference.) If the
params
argument is a function, this scope is used for that function also.
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 number of seconds to wait for a response before timing out (defaults to Ext.Updater.defaults.timeout).
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.
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).
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.
});