Ajax page updates on a timer
Posted 05 May 2011 - 12:34 PM
I'm following a post on how to implement AJAX updates by using the built in functionality in Yii. The post is here: http://www.yiiframew...-partialrender/
In that post, the author describes how to do it but he uses an "ajaxbutton" I was wondering if you could perform the same functionality on a timer, so that the page would refresh every 30 seconds or whatever you would want. I think I know how I could do it by hand but is there any built in functionality that would save me some time and allow me to keep utilizing the prebuilt functionality in Yii?
Posted 06 May 2011 - 05:37 AM
So - to answer your question - I'm personally doing this by hand, as for me this is too simple code / functionality to look for build-in Yii feature for this. But I don't deny, it exists! I just found that writing this myself wasted less time than to look for it in a huge Yii documentation!
Posted 06 May 2011 - 11:19 AM
and pass the url like in the wiki CController::createUrl('helloWorld/UpdateAjax');
Or... you can actually do something nicer, like reading some articles about commet or realtime ajax
- Extension: XUpload - jQuery File Upload Extension
- Extension: PhpQuickProfiler - A Web Log Router that will help you profile your application
- Extension: XDateView - A Date grouped Grid View
- Extension: Foundation - An easy to use, powerful, and flexible framework for building prototypes and production code on any kind of device.
- Wiki: How to generate Yii like Documentation
- Wiki: How to re enable logging during unit testing