Changes between Version 19 and Version 20 of AJAX/Dojo/RefactoredFormSubmit
- Timestamp:
- Feb 16, 2007, 8:23:31 AM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AJAX/Dojo/RefactoredFormSubmit
v19 v20 1 2 == Refactored form submit with Dojo and newforms == 3 4 === Synopsis === 5 6 A simple recipe for validating a form with AJAX. 1 7 2 8 === Introduction === 3 9 4 Here's a simple recipe that worked for me. It is quite inspired by the [wiki:AjaxDojoFormSub] example―and from [http://www.b-list.org/weblog/2006/07/31/django-tips-simple-ajax-example-part-1 this tutorial]―except that this recipe is using python-cjson to receive JSON-encoded data. 10 Dojo and Django are two emerging toolkits gaining in popularity theses days. 5 11 6 My initial objective was to display validation errors without doing a page-refresh, while using 7 JSON for carrying errors (or whatever else you could possibly imagine) back to the client browser. 12 The following article is describing a step-by-step recipe inspired from [wiki:AjaxDojoFormSub] and from [http://www.b-list.org/weblog/2006/07/31/django-tips-simple-ajax-example-part-1 this tutorial] for 13 validating a form with Dojo and the Django newforms API. 14 15 ''My initial objective was to display validation errors without doing a page-refresh, while using 16 JSON (python-cjson) for carrying errors (or whatever else you could possibly imagine) back to the client browser.'' 8 17 9 18 === The server view === … … 134 143 === Notes/Comments/Suggestions === 135 144 136 Add some notes (or comments!) here. :-) 145 Does that make any sense at all? 146 147 Add some comments here. =) 137 148 138 149 === References ===