Entries published on August 5, 2006
Django tips: A simple AJAX example, part 2
Last time around we looked at how to write a simple view which processes a form and either returns errors or returns success, and then tweaked it slightly so that the same view could handle either a “regular” form submission (in which case it operates normally), or an XMLHttpRequest
(in which case it returns JSON).
Today we’ll look at writing the JavaScript side of it; for reference, here’s the live example we’re going to build. This will be a fairly long write-up, but that’s not an indication of the complexity of the process; I’m deliberately being much more verbose …