I have a situation where the user fills in a form and hits submit to
post the form.  If my views.py code detects an error in the form, I
want to return some info to the client and put it into the dom via
jquery.  If there is no error, I want to redirect to another page.
Can anyone advise me on the best way to do this?  I've succesfully
used $.post() to grab the error info and put it in the dom.  However,
in the case where there is no error, I can't figure out how to do the
redirect.

I've tried having the views.py code pass back the url that I want to
redirect to, and then when my $.post() callback function is called, it
sets window.location to that url.   But this seems to have some issues
when the url contains an anchor (for some reason firefox seems to
cache anchored urls and not redirect to them in the normal way).

Is there any way to specify that even though $.post() started the
server request, that the server should just redirect to a url (ie,
using just the basic HttpResponseRedirect() or something like that)
and not return and call the $.post callback function?

Thanks for any pointers,

Margie
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to