Documentation Index

CPAINT :: Cross-Platform Asynchronous INterface Toolkit

Frontend: cpaint.call()

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 call()

cpaint Property Summary

boolean capable

void call ( string url, string remote_method, function callback_function [, mixed args [, mixed ...]] )

Triggers the call of the CPAINT backend.

Class

cpaint

Parameters

» string urlthe URL of the backend application script
» string remote_methodname of the backend function to call by CPAINT (not required if using a proxy or calling a non-CPAINT file/implementation)
» function callback_functionname of the JavaScript application function that will receive the backend response
» type argsarguments(s) to the backend application function

Return Value

» void

API Tags

» Access: public

Description

This function will trigger the call of the CPAINT backend which in turn will call your backend application and will provide it with the arguments passed by args. You must supply a new argument for each argument you want to pass to the backend.

When cpaint.set_async(true) - which is the default - then your frontend application code will continue to run and will not wait until the response from the backend has been processed by CPAINT.