-
Book Overview & Buying
-
Table Of Contents
YUI 2.8: Learning the Library
The third argument to .asyncRequest() is usually referred to as the Callback object, since its main purpose is to provide the references to the callback functions. Connection Manager was one of the first library components and the vocabulary used in the YUI has evolved. Nowadays, we would call this a "configuration object", but the old name stuck and since all the documentation uses the traditional name, we will do likewise. The configuration options available to us are:
success: A callback function to be called on successful completion of the request
failure: A callback function to be called on a communication failure
upload: A callback function to be called on a successful file upload
argument: Any value that we want to associate to this transaction
timeout: The number of milliseconds to wait for a reply
scope: The scope we want our callback to execute in
cache: Whether we want to use the browser's cache
The most common members you would use in your callback...
Change the font size
Change margin width
Change background colour