Quick and Dirty AJAX
9 June 2006 | Tutorials | 18 Comments
I’m trying something a little different today. It took me a while to figure out why I couldn’t open a free account with YouTube for about 3 weeks but now that it’s all straightened out I thought I’d upload a video where I walk you through some of the basic ways you could use jQuery to add AJAX functionality to your site.
The video is short because my understanding of YouTube is that I have to limit the file to 10 minutes. Not everything I’ve said in the tutorial is 100% correct. There are minor mistakes such as the part where I call cgi a “server side script” when it would be more accurate to say “server side language”.
Cut me some slack… woodya?
Is It AJAX, or AHAH, or AXAH?
What you’re going to see is really more AHAH than true AJAX.
The difference? The X in AJAX is for XML. More often than not you can grab chunks of text or javascript from a separate file without going through the hassle of messing around with XML. Here’s a better description of AJAX vs. AHAH.
As for AXAH… I’ll leave that to Cody Lindley to explain. His article is a good read, you should check it out if you want some more background on the basic concepts of workable AJAX.
The Tutorial
Here’s the page on the jQuery site where I run through the examples. The link opens in a new browser window.
Technorati Tags: AJAX, AHAH, AXAH, Cody Lindley, jQuery, javascript
Subscribe
18 Comments
Leave a Reply
You can follow the discussion through the Comments feed. You can also pingback or trackback from your own site.






the video doesn’t load since you’ve got it set as private
It’s fixed now. Lesson to those watching me make mistakes in real time… double check your multimedia in multiple browsers — stupid rookie mistake made by someone who should know better.
Great video, Jack! It’s a great step through on how jQuery AJAX works.
Ladies and Gentleman… John Resig, the creator of jQuery.
Thanks for the kudos John. Great to have you swing by!
For what it’s worth, I couldn’t get an XML file to load using the example posted on the jQuery page. I had to either use “$.getXML” (instead of “$.get”) or pass the “type” parameter to “$.get”) for it to work.
Using FF 1.5.0.3 on Debian + latest jQuery source, should that matter.
I’ll ask John Resig to look at your bug, as I am unable to test for this using Windows.
Pete,
You probably thought I was giving you the brush off… but I contacted John Resig and he had this to say:
Does anyone know how to add a pageloader like the one when ThickBox is using when page loading when loading external data?
I just posted a short tutorial on ThickBox.
If you run through the code you’ll see that Cody Lindley, the guy that created it, appends a div to the page with an animated gif inside, and then removes the div when the content for the Thickbox is ready.
for what it’s worth, i just checked out your (and John’s) reply, specified the content-type properly and it worked like a charm. Thanks! Sorry it took me so long to get back to you; I had a little baby boy. =]
now the web page example drop an error with firefox 1.5
jquery.com/demo/ajax/ > [an error occurred while processing this directive]
Yep, I’ve contact John, the creator of jQuery, for an updated link.
Jack
thanks for the cool demo however the page you initially drill down to appears to have vanished. I’ve seen it before but not for a while.
Could you provide a link to the page you base this tute on?
sorry, just saw the link *under* the youtube box
why did they go and change the site background colour to white from black?
just to confuse ppl?
pd - I have looked, but I don’t think that exact tutorial is on the jQuery site any more.
This video is incredible
[…] Quick and Dirty Ajax (inglês) […]