javascript - How to stay at the same place of the page after you send post comment using Django-comments -


now use next code <input type="hidden" name="next" value="{{ request.get_full_path }}" /> in comments/form.html , after post new comment page content , comments list refreshes , should scroll down see post. it's not want.

i want stay @ same page after send post, without refreshing. it's possible?

there 2 principle ways of doing want:

  1. give unique id each comment , pass url create so-called bookmark. you'll smth http://the/url/you/want#desired-post-id , automatically jump post want.
  2. use ajax refresh part of page changing. in case you'll stay there are.

Comments

Popular posts from this blog

Sass watch command compiles .scss files before full sftp upload -

filehandler - java open files not cleaned, even when the process is killed -

gridview - Yii2 DataPorivider $totalSum for a column -