Posts tonen met het label prototype. Alle posts tonen
Posts tonen met het label prototype. Alle posts tonen

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....