- ⌂ ajax
- Methods
ajax::include_all()
Include the following AJAX key/value pairs when an ok() and error() response is sent.
- Result - "OK" on
ok(), "ERROR" onerror(). - Message - Message set with
ajax->Message = 'example message'orajax->set('message', 'example message'). - Timestamp - Timestamp from when
ok()orerror()was called. - Data - Any data passed to
ok()orerror().
The second parameter passed to
ajax::ok() and ajax::error() can be set to TRUE instead of calling this method.Prototype
void include_all()
Example
// send AJAX response with JSON like:
// {"Result":"OK", "Timestamp":"2018-04-12 10:53:07", "Message":"Success"}
$ajax = new \io_comand_web\ajax();
$ajax->include_all();
$ajax->ok('Success');
webCOMAND Docs