Category Archives: ajax

Updating multiple divs with Ajax. Without crashing Firefox

In an earlier post I showed you how you can update multiple divs with Ajax. But there was one problem: it crashed Firefox on my machine, and other people reported the same problem, whereas it worked for others… In a comment, Josh Southern, pointed me to the cause of the problem: the “latest” version, 1.4, […]

How to update multiple divs with Ajax

This is a question which arises from time to time in the CakePHP google group. There is an example in the group, but I have to admit I didn’t understood it the first time I read it. So I try to provide a better example. First we create a view with an Ajax link and […]

AjaxLoad – custom ajax activity indicators

AjaxLoad is a nice little service which allows you to create customized ajax activity indicator gifs.

Autocompletion – the easy way

Nate has published a nice component which makes the creation of an input field with Ajax autocompletion very easy. In fact, it is (almost) as easy as creating a simple input field. What do you have to do? Put the component to your app/controllers/components directory. In your controller you have to include the component with: […]

An Ajax file upload progress bar

Felix Geisendörfer has announced an Ajax file upload progress bar which integrates with CakePHP. The solution looks very promising, but check it out yourself, there is a demo online.

A simple redirect component

I already wrote about doing a redirect with Ajax. Now, I created a simple component from that code I presented there: // app/controllers/components/redirect.php class RedirectComponent extends Object { var $controller; var $components = array(‘RequestHandler’); function startup(&$controller) { $this->controller =& $controller; } function goto($url) { if ($this->RequestHandler->isAjax()) { $this->controller->set(‘url’, $url); } else { $this->controller->redirect($url); } } […]

30 Ajax tutorials

Max Kiesler has published in his blog a list of 30 Ajax tutorials. If you use Ajax, I am sure you will find in this list some new ideas. I am especially happy about the fact that one of these 30 tutorials is an article I wrote in this blog two months ago (“Submit a […]

Redirect with Ajax

In my current project I have a login form I want to validate with Ajax. If everything is ok, the user should be redirected to the respective start page. As it seems to be impossible to do the redirect on the server-side (at least to me), I do it on the client-side. I use the […]

Signature of AjaxHelper::submit() has changed

The signature of AjaxHelper::submit() has changed, and is not compatible with code from RC4 (or before), i.e. it will break existing code. Here is the old function signature: function submit ($name, $value, $options = array()) It has been replaced by the following function signature: function submit ($title = ‘Submit’, $options = array()) You know the […]

An Ajax task list with CakePHP

Graham Bird has written a nice tutorial about creating a simple task list with CakePHP and Ajax. There is also a live demo available at