The TCallback provides a basic callback handler that can be invoked from the
client side by running the javascript code obtained from the
{@link TBaseActiveCallbackControl::getJavascript ActiveControl.Javascript} property.
The event {@link onCallback OnCallback} is raised when a callback is requested made.
Example usage:
Click Me!
/** * Registers the javascript code for initializing the active control. * @param THtmlWriter the renderer. */ public function render($writer) { parent::render($writer); $this->getActiveControl()->registerCallbackClientScript($this->getClientClassName(), $this->getTriggerOptions()); if ($this->getStartTimerOnLoad()) { $id = $this->getClientID(); $code = "Prado.WebUI.TTimeTriggeredCallback.start('{$id}');"; $cs = $this->getPage()->getClientScript(); $cs->registerEndScript("{$id}:start", $code); } }