23
Feb
07

Get Started With AJAX in CakePHP

This article has useful links for a CakePhp new comer to get started with using Ajax. As the manual mentions, using Ajax in your Cake application is very easy. Ajax is implemented in Cake through the Cake Ajax Helper, which is included with Cake by default. The Cake Ajax helper utilizes the ever-popular Prototype and script.aculo.us libraries for Ajax operations and client side effects.

Below are some useful resources that got me started with Ajax in CakePHP. I hope these will help you too:

1. Getting Started:

2. AutoComplete:

3. Ajax Redirect:

4. Ajax Validation:

5. Encoding:

6. Ajax Uploader:

7. Ajax Star Rating:

8. Ajax Chat:

9. TinyMCE with Ajax:

10. Dojo Helper

11. Updating Select Box using Ajax

12. CakePhp API

13. Search The Cake PHP Google Group

Feel free to leave comment. And, if you think I have left out some useful links, do let me know too.


30 Responses to “Get Started With AJAX in CakePHP”


  1. 1 Riky Kurniawan 18 March, 2007 at 7:25 pm

    Wow, such a great compilation to start baking with CakePHP.

  2. 2 Sree 19 March, 2007 at 1:07 pm

    Thanks, this really will help me…

  3. 3 Leandro Ardissone 2 April, 2007 at 8:57 pm

    Great links collection!

    Also you could create another Cake links compilation for all-purpose tutorials, that should be great.

  4. 4 Glen Smith 3 April, 2007 at 1:38 pm

    Nice collection of links. This will really help me get up to speed using the framework.

  5. 5 abhay jain 9 April, 2007 at 11:24 pm

    Hi friends.

    I have one problem in Ajax. How can we call a javascript function with ajax in cake Php?. I dont exactly get the syntax. So Plz help me out. And the collection of links in this page is great.

  6. 6 Ahsan 20 April, 2007 at 12:05 pm

    @abhay jain:

    Im not sure what you are exactly trying to say, but if i got you correct, you want to have ajax call from your javascript. If thats so, here are some hints:

    What the cake ajax helper does is that it generates js that makes the ajax call. To be exact, it generates javascript that make use of the prototype library. So, if you have used the Ajax helper in a particular page, you will see that cake genarates javascript in that particular page. You can view this generated js, by looking at the source of the generated html.

    Instead of using cake to generate the ajax calls, you can write your own js, using the prototype library(or any other library for that matter). All you have to do is to learn the ajax functions of the prototype library. You can get to know more about prototype ajax function here: http://www.prototypejs.org/learn/introduction-to-ajax

    I hope i was helpful, and sorry for the late reply :)

  7. 7 Miko 16 May, 2007 at 12:51 am

    Here is a new ajax powered free chat http://chantlive.com,
    that can be integrated to WordPress.
    I hope this help :)

  8. 8 tuanna 25 May, 2007 at 1:31 pm

    Hi all,
    I have problem when check to match 2 field. My work is , I have 2 textbox I have to compare them and using ajax.Fox example : 1 field is password, another field is confirm password . I want to use onchange event when I finish fill out confirm password field.
    Help me pls.

  9. 9 Howard 30 August, 2007 at 2:59 am

    Brilliant article, well done.

    I’ve been using 1.2 for 3 months with success and have a big app up and running, but there were links and techniques I hadn’t come across in here. This page is definitely in my bookmarks now!

  10. 10 Mo 12 October, 2007 at 6:17 am

    Will this work in 1.2??? Thnx

  11. 11 Ahsan 12 October, 2007 at 10:53 am

    @Mo: Yeah, I do not see any major changes in the Ajax helper in 1.2, so most of the things should be working fine. I am glad that my posts have been helpful to you :)

  12. 12 Mo 13 October, 2007 at 12:48 am

    Thnx!!!

  13. 13 Boris 27 December, 2007 at 11:08 pm

    Thanks man. This is going to be a great help.

  14. 14 Wall 11 February, 2008 at 11:53 am
  15. 15 Patric 12 February, 2008 at 4:25 pm

    Hi,

    Very useful thanks. I notice that the devmoz Updating Select Box using Ajax tutorial is no loner available on their site, does anybody know where I could find this, or just an example of something similar, as this is exactly what I am attempting to get right!

  16. 16 Joselee 13 February, 2008 at 2:15 pm

    Thank you very much for the links that have helped me start to understand ajaxHelper, I am submitting form using ajax form, but I can not clear the form field values after, can any one help on this.

  17. 17 Vlad 16 February, 2008 at 11:47 pm

    Hey man, thanx for the resources. It helped me a lot. Best of luck!

  18. 18 Daniel 26 February, 2008 at 5:07 am

    Really a great list to learn about Cake’s AJAX capabilities. Thanks Ahsan!

  19. 19 Andrew Allen 22 March, 2008 at 2:22 pm
  20. 20 Hunka 2 June, 2008 at 6:58 pm

    Very helpful.

  21. 21 fiqhi 3 July, 2008 at 2:49 pm

    cool!
    i’ll bookmark this url :)

  22. 22 Tarandeep 25 August, 2008 at 1:27 pm

    Good one. Still need more details…

  23. 23 name 1 September, 2008 at 1:56 pm

    Hi!,

  1. 1 Glen’s Corner - » Trying some cake Pingback on Apr 3rd, 2007 at 1:47 pm
  2. 2 Nice writeup of Ajax use in CakePHP at DLMax Pingback on Apr 3rd, 2007 at 3:19 pm
  3. 3 你来跑步吧 » Blog Archive » Using Ajax in CakePHP Pingback on Oct 16th, 2007 at 8:46 pm
  4. 4 jamiebrammer.com » Blog Archive » My del.icio.us bookmarks for November 29th through December 29th Pingback on Jan 9th, 2008 at 1:02 am
  5. 5 Blog Dot Php With cakePHP » Полезные ссылки по cakePHP Pingback on Jan 26th, 2008 at 1:49 am
  6. 6 casino games Trackback on Apr 3rd, 2008 at 2:23 am
  7. 7 internet casino poker Trackback on Apr 18th, 2008 at 9:10 pm

Leave a Reply