7.1.2.3 remoteTimer
remoteTimer(array $options)
Periodically calls the action at $options['url'], every $options['frequency'] seconds. Usually used to update a specific div (specified by $options['update']) with the result of the remote call. Callbacks can be used.
remoteTimer is the same as the remoteFunction except for the extra $options['frequency']
Example:
<div id="post"> </div> <?php echo $ajax->remoteTimer( array( 'url' => array( 'controller' => 'posts', 'action' => 'view', 1 ), 'update' => 'post', 'complete' => 'alert( "request completed" )', 'position' => 'bottom', 'frequency' => 5 ) ); ?>
<div id="post"></div><?phpecho $ajax->remoteTimer(array('url' => array( 'controller' => 'posts', 'action' => 'view', 1 ),'update' => 'post', 'complete' => 'alert( "request completed" )','position' => 'bottom', 'frequency' => 5));?>
The default $options['frequency'] is 10 seconds


























