Right, that's my point exactly :) After looking at my class that does exactly what you described hairbo asked me:
> Question, though: why do the form submission as > JSON at all? Why not just do a regular form post submission? On Oct 15, 2010, at 1:46 AM, Mikhail Korobov wrote: > On 15 окт, 03:13, Ryan Florence <[email protected]> wrote: >> How else would you validate with the server and provide user feedback on the >> page with JavaScript? If you actually submit as usual, reload a new page >> that validates on the server, just write the validation errors old school >> with the server side code, right? >> > > You submit regular data with ajax request and don't reload the page. > On server side using browser headers you distinguish ajax requests > from regular requests (e.g. request.is_ajax() in django) and return > json for ajax requests or regular html for regular requests. So the > server-side code doesn't have to implement different validation for > ajax and non-ajax version and there is always a fallback for people > with non-working javascript.
