Examples:
Default options:
<div id="post">
</div>
<?
echo $ajax->remoteTimer(
array(
'url' => array( 'controller' => 'ajax', 'action' => 'view', 1 ),
'update' => 'post', 'position' => 'append', 'frequency' => 30
)
);
?>
Comments
Post a comment
Additional options:
- $options['before'] - this options will be executed before sending Ajax request
- $options['after'] - this options will be executed after sending Ajax request
- $options['confirm'] - this options will be displayed in confirm window
- $options['condition'] - Ajax request will be created only if condition will return true
- $options['position'] - where responseText should be placed (posible values: html, text, append, prepend, after, before, wrap...)
- $options['with'] - string parameters that will passed to Ajax data option
- $options['form'] - id of form that will be serialized adn passed to Ajax data option
- $options['indicator'] - id of element that will be shown while browser is waiting form response from server
- $options['frequency'] - how often request should be fired (in seconds)
2010-07-13 10:20:03
Hei.
It is greate plugin.
But how could I make it work so, that it would update different div depending on response xml.
Thx, srumjant.
2010-07-16 10:39:07
srumjant, you can use something like this:
<?php
echo $ajax->remoteTimer(
array(
'url' => array( 'controller' => 'ajax', 'action' => 'view', 1 ),
'frequency' => 5, 'complete' => 'alert(request.responseText); your_function_here(request.responseText)'
)
);
?>
2010-10-20 10:02:53
=> kvas: I 'm using your plugin, I also find the way how to update different div depending on response xml. Thanks so much, I really love you much :D
2010-10-29 19:49:36
@BiBiBN: care to share how you did that ?
2013-02-19 10:56:17
Hello, I have a question about having an internal error. I followed everything in the installation guide but it is not working for me.
<?php
echo $this->Ajax->remoteTimer(
array(
'url' => array( 'controller' => '/inboxes/statistics', 'action' => 'index', 1 ),
'update' => 'updates', 'frequency' => 10
)
);
?>
here is my code. Thank you. :)
2013-02-21 09:29:33
Hi Roi,
What error do you get? How do you include your helper in controller?