FilChi Weblog

Archive for the ‘ajax’ Category


If you want to call a controller/action in crontab, you simply must:

1. create a copy of index.php in your app’s webroot directory,
and rename it to cron_dispatcher.php or to any filename.

2. after this, somewhere in line 78 of index.php of your app’s webroot directory,

require CORE_PATH . ‘cake’ . DS . ‘bootstrap.php’;

put code:

if($argc == 2) {
$Dispatcher= new Dispatcher();
$Dispatcher->dispatch($argv[1]);
}

this code will get argument from php commandline having index = 1.

so, in your crontab,

* * * * php -q /var/www/html/cake/webroot/cron_dispatcher.php Controller/action


Yesterday, I just tried to learn how to use JQuery with Ext in case of need for future sideline projects. It is not that easy at first however, because, to understand the integration better, you still have to understand how ExtJS runs and how to start coding ExtJS for your projects.

Read the rest of this entry »


I was doing this web report, and I thought of improving its user interface design, so I decided to use jquery ajax tabs UI.

But because the ajax-ed content is very large, the tab, when clicked, looks like this in Firefox:

ajax content caching

AFAIK, Firefox does not cache ajax content, which is contrary to what Internet Explorer does.

I just want to share additional info regarding the ajax tabs:

everytime you select the tab with ajax content, the tab starts to process ajax. Meaning,

even when not necessary, the ajax still runs. That sucks, huh!? 😦

I overlooked that in the JQuery Tabs options params, you can set the ajax cache to true and the ajax won’t run everytime you click on the tab.
(Source: JQuery Ajax Tabs )
Code:   $(‘.selector’).tabs({ cache: true });
$(‘.selector’).tabs({ ajaxOptions: { async: false } });


Flickr Photos