-2

Now I use next code <input type="hidden" name="next" value="{{ request.get_full_path }}" /> in comments/form.html and after I post a new comment the page with content and comments list refreshes and I should scroll down to see my post. It's not what I exactly want.

I want to stay at the same page after send a post, without refreshing. It's possible?

Oleg
  • 777
  • 1
  • 6
  • 10

1 Answers1

0

There are two principle ways of doing what you want:

  1. Give a unique id for each comment and pass it to the url to create a so-called bookmark. You'll get smth like http://the/url/you/want#desired-post-id and so you will automatically jump to the post you want.
  2. Use ajax to refresh only a part of a page that you are really changing. In that case you'll just stay there you are.
chem1st
  • 1,624
  • 1
  • 16
  • 22