entries tagged with "ajax"
-
Hijaxing Form Submission: Writing The View posted by Andrew
Read more...After writing about how to use Mootools to hijax form submission I thought I should follow it up with how to integrate this with the backend code. In this case it's Django, so all of the code is contained in a view which will simply return HTML in response to a regular POST and JSON to a XMLHttpRequest. Below is some sample code which demonstrates the idea:
def contact(request): """Sample view to demonstrate using newforms with both hijaxed ... -
Hijaxing Form Submission with Mootools posted by Andrew
Read more...Not having used the mootools Javascript library to any great extent, I thought I'd try it out on our contact form and add a bit of AJAX to get rid of the page refresh when the form gets posted.
Mootools was chosen over other libraries like YUI, script.aculo.us or Prototype because it's designed to be small, fast and modular. Because you choose the functions you need when you download, the script size is kept to a ...
