Thanks Thomas for your reply. I just tested it with Firefox. "Cancel" button works perfect. With IE "Cancel" button has such a problem.
Let me do more test and see. On Aug 19, 7:50 am, Thomas Guettler <h...@tbz-pariv.de> wrote: > Hi David, > > David schrieb: > > > Hello, > > > I have a "Cancel" button on one of my Webpages. The button sometimes > > works as expected, sometimes it does not. After the button has been > > clicked, it is supposed that the webpage is re-directed to another > > page. However, this re-direction seems not work all the time. > > Following is my script. > > When does it work and when not? Does it work in one browser always, and > in a different browser never? Django does not do any random stuff. > What happens if the redirect does not work? > > > > > In my urls.py: > > > .... > > (r'^cancel/$', cancel), > > ..... > > > In my view.py: > > > def save_view(request): > > > if request.POST: > > action = request.POST['action'] > > I stopped getting any values from request.POST or request.GET. I use > the form library. > > > if action == 'Cancel': > > url = '/cancel/' > > # this_url = reverse('cancel') > > # return HttpResponseRedirect(this_url) > > return HttpResponseRedirect(url) > > > And my "cancel" view is really simple. It is > > > def cancel(request): > > return render_to_response('cancel.html') > > I guess the error is in cancel.html. You need to post it here. > > HTH, > Thomas Güttler > > -- > Thomas Guettler,http://www.thomas-guettler.de/ > E-Mail: guettli (*) thomas-guettler + de --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---