bq. Do you typically write a single server-side handler that works for ajax and standard form posts? If so, how do you detect which occurs, so you return full HTML on a form post, or a redirect, rather than the Ajax xml snippet?
For a more complex implementation, this is a good idea. The ideal implementation would have three server-side components:
# the server-side functionality
# the Ajax interface to the functionality
# the traditional interface to the functionality
How these are implemented depends on the scale of your app: separate files, separate functions, separate single lines of code.
There are a number of ways to detect whether to use the Ajax interface or the traditional interface. You could add an extra GET variable to the Ajax call to act as a flag. You could use POST for the traditional form submission instead of GET (semanticists may take issue with this, depending on what your form’s task is). Or you could just give each interface a separate file.