Re: How to come to #anchor After Form Submit with message rendering..
oh okay, i will try it... there are jquery ajax form submit versions too, but it is a good idea thanks On 26 Feb., 15:30, bb6xtwrote: > Hi, > You could also pass a variable in the response's dictionary and use > javascript to check this variable and navigate appropriately. This > variable should indicate if postback or new request. -- 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.
Re: How to come to #anchor After Form Submit with message rendering..
Hi, You could also pass a variable in the response's dictionary and use javascript to check this variable and navigate appropriately. This variable should indicate if postback or new request. -- 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.
Re: How to come to #anchor After Form Submit with message rendering..
Hi, You could also pass a variable in the response's dictionary and use javascript to check this variable and navigate appropriately. This variable should indicate if postback or new request. -- 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.
Re: How to come to #anchor After Form Submit with message rendering..
hey Lokesh, good point, i didnot think about this.. thanks.. On 25 Feb., 19:30, lokeshwrote: > hi, > > You should use .ajax() to submit your form.That way your page does > not load and you need not worry about where the page is pointing. > > Lokesh > > On Feb 25, 3:03 am, doniyor wrote: > > > > > > > > > hi there, > > i have a small problem... > > > i am rendering a success message "Registration Done!" to the site, i > > am able to do it, but after submisson, the browser goes to the > > startposition, not to the place where i filled out the registration > > form.. how can i go to this part of the page directly after submission > > with rendering this message next to registration field. here is my > > view function.. > > > > > def register(request): > > name = request.GET.get('name') > > surname = request.GET.get('surname') > > email = request.GET.get('email') > > geb = request.GET.get('geb') > > addr = request.GET.get('addr') > > plz = request.GET.get('plz') > > country = request.GET.get('country') > > tel = request.GET.get('tel') > > > user = User(u_name = name, u_nachname=surname, u_email=email, > > u_birth=geb, u_addr=addr, u_plz=plz, u_country=country, u_tel=tel) > > user.save() > > > success = "Registration Done!" > > return render_to_response('index.html', {'registered': > > success},context_instance=RequestContext(request)) > > > > > is it possible to give some another parameter to render_to_response > > indicating the url ? > > > thanks for help ! -- 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.
Re: How to come to #anchor After Form Submit with message rendering..
hi, You should use .ajax() to submit your form.That way your page does not load and you need not worry about where the page is pointing. Lokesh On Feb 25, 3:03 am, doniyorwrote: > hi there, > i have a small problem... > > i am rendering a success message "Registration Done!" to the site, i > am able to do it, but after submisson, the browser goes to the > startposition, not to the place where i filled out the registration > form.. how can i go to this part of the page directly after submission > with rendering this message next to registration field. here is my > view function.. > > > def register(request): > name = request.GET.get('name') > surname = request.GET.get('surname') > email = request.GET.get('email') > geb = request.GET.get('geb') > addr = request.GET.get('addr') > plz = request.GET.get('plz') > country = request.GET.get('country') > tel = request.GET.get('tel') > > user = User(u_name = name, u_nachname=surname, u_email=email, > u_birth=geb, u_addr=addr, u_plz=plz, u_country=country, u_tel=tel) > user.save() > > success = "Registration Done!" > return render_to_response('index.html', {'registered': > success},context_instance=RequestContext(request)) > > > is it possible to give some another parameter to render_to_response > indicating the url ? > > thanks for help ! -- 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.
How to come to #anchor After Form Submit with message rendering..
hi there, i have a small problem... i am rendering a success message "Registration Done!" to the site, i am able to do it, but after submisson, the browser goes to the startposition, not to the place where i filled out the registration form.. how can i go to this part of the page directly after submission with rendering this message next to registration field. here is my view function.. def register(request): name = request.GET.get('name') surname = request.GET.get('surname') email = request.GET.get('email') geb = request.GET.get('geb') addr = request.GET.get('addr') plz = request.GET.get('plz') country = request.GET.get('country') tel = request.GET.get('tel') user = User(u_name = name, u_nachname=surname, u_email=email, u_birth=geb, u_addr=addr, u_plz=plz, u_country=country, u_tel=tel) user.save() success = "Registration Done!" return render_to_response('index.html', {'registered': success},context_instance=RequestContext(request)) is it possible to give some another parameter to render_to_response indicating the url ? thanks for help ! -- 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.