Rasmus’ 30 second AJAX Tutorial

This is a great and simple example/tutorial on AJAX by Rasmus Lerdorf (the creator of PHP).

It’s just AWESOME!

Rasmus’ 30 second AJAX Tutorial

(Original Post @ php-general mailing list)

7 Comments

  1. Posted July 28, 2006 at 2:18 am | Permalink

    Nice tutorialm although it might make people stop thinking I am a magician :-) .

    BTW There is a minor typo in the example code:

    In function handleresponse:

    document.getElementById(update[0]).innerHTML = pdate[1];

    pdate should be update of course.

  2. Posted July 28, 2006 at 8:30 am | Permalink

    Yes, Rasmus’ tutorial is really great.

    Thanks for bringing the typo to my attention. It’s been fixed.

    Cheers!

  3. Posted September 15, 2006 at 3:56 am | Permalink

    I like it, especially as it promotes small is beautiful. Have you considering putting in on digg.com?

    There again my “smallest” AJAX example got called crap!! :(

  4. Posted February 3, 2007 at 3:36 pm | Permalink

    Hi,

    First off. Great tutorial. It think I search the web for an hour just for a simple explanation.

    Second. It is a bit late here but I think there is a minor bug in the tutorial

    if(response.indexOf(‘|’ != -1)
    shouldn’t that be
    if(response.indexOf(‘|’ )!= -1

    Anyway thanks, keep up the good work.

    Cheers, Ron AF Greve

  5. Posted February 3, 2007 at 4:30 pm | Permalink

    Ron, thanks for brining the typo to my attention. I’ll fix it before long.

    Best!

    EDIT: Typo has been fixed :P

  6. Henning Mann
    Posted July 9, 2007 at 11:02 am | Permalink

    The Script doesn’t work! Can anyone paste the whole two files, please? Thanks!

  7. Posted July 9, 2007 at 11:44 am | Permalink

    Henning Mann,

    There’s nothing to paste. The ‘whole two files’ code is there on the page.

    Since it’s work for others, you may be doing something wrong for it not to work.