/core/service/ajax/AjaxResponse.class.php

Description

Ajax response builder

This class contains methods that allow to build a sequence of Javascript commands to be executed on the client side, when the request is completed.

Examples:

  1.  function sayHello($params{
  2.    $response new AjaxResponse();
  3.    $response->alert('Hello World!');
  4.    return $response;
  5.  }
  6.  function sum($params{
  7.    $result ($params['a'$params['b']);
  8.    $response new AjaxResponse();
  9.    $response->setValue('result'$result);
  10.    $response->clear(array('a''b'));
  11.    $response->focus('a');
  12.    return $response;
  13.  }
  14.  $service new AjaxService();
  15.  $service->registerHandler('sayHello');
  16.  $service->registerHandler('sum');
  17.  $service->handleRequest();

Classes
Class Description
AjaxResponse Ajax response builder

Documentation generated on Sun, 07 Oct 2007 19:20:00 -0300 by phpDocumentor 1.3.2