Please note: CPAINT nor this website is under active development. |
Frontend: cpaint.set_response_type()
cpaint Method Summary
void set_debug()
void set_proxy_url()
void set_transfer_mode()
void set_async()
void set_response_type()
void set_persistent_connection()
void set_use_cpaint_api()
void set_auth_user()
void set_auth_pass()
void call()
cpaint Property Summary
void set_response_type ( string response_type )
defines the response type.
Class
Parameters
» string response_typeresponse type to use (TEXT|XML|OBJECT)
Return Value
» void
API Tags
» Access: public
Default Value
» OBJECT
Description
Defines which response type the backend will use and which dataformat will be handed over to the callback function of your application:
- E4X will return the XML from the backend as Javascript XML() object and thus allowing E4X notation. Supported by Firefox 1.5 only!
- JSON will return the data structure from the backend as JSON dataset. Note that class methods will not be part of the response, only the data.
- OBJECT will return XML as well but in this case CPAINT will generate a JavaScript object structure for you and return this to the callback function.
- TEXT will return a plaintext response.
- XML will return a JavaScript XMLHttpObject. This can be traversed via standard DOM functions.