Hello, I have a django project where I make requests to the server views both by AJAX and the usual simple URL requests to Django.
The thing is that I have made one javascript function for storing the forms contents in the HTML5 webstorage and I want to clear the stored data after coming from a succesful operation, beacuse the flow is: 1. You get to the form 2. You enter the data into the form 3. Press submit a. If there is a validation error, we come back to 3 and the javascript function fills the same data entered into the form (this is already done and is awesome and comfortable for the user) 4. If all data was valid and OK, after returning from the python/django view I want to trigger the javascript function that clears the stored data, because is saved and we don't need it anymore because it's already saved. *This is my problem* When returning to an AJAX I can simply use the success function in jQuery.get() o jQuery.ajax(), but when returning from a regular view I can't think of any strategy other than passing the flow to a success page, in which I trigger the function with $(document).ready(). I'm looking for the best alternative, because it would be better not forcing me to pass through a specific page. Any ideas? Thank you in advance. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/bffd59a7-c30f-4092-8160-30ef7e472b27%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.