dinsdag 19 februari 2008

Ajax is so easy...

Ok, download CakePHP 1.2 and create a basic website with some scaffolding or something. Include Prototype or jQuery and think about a part of your page you want to replace with the result of an Ajax request.

Suppose you have a scaffolded list of customers. When you press the View link, Cake redirects you to customers/view/123. You can catch the link and call some Javascript to load the result of customers/view/123 in a div on your index page. Quite easy, but you now see your header twice. Not cool. Hmmm....

maandag 11 februari 2008

Adding a filter to scaffolded tables

I just wrote a start for a filter which I can easily add above scaffolded tables. Scaffolding is great, but I want a form above to limit the number on results based on my parameters. It is not finished, but I just post what I have, any tips, let me know.

vrijdag 8 februari 2008

jQuery worth trying

This is a very short post, but I wanted to tell you about jQuery. I tried it earlier this week in a new CakePHP 1.2 project. Just included jquery.js in my layout and used the code below to have a toggle effect. With Mootools I always needed much more code to achieve this effect.

Try this example.

Let me know what you think of this!