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:
- give unique
id
each comment , pass url create so-called bookmark. you'll smthhttp://the/url/you/want#desired-post-id
, automatically jump post want. - use
ajax
refresh part of page changing. in case you'll stay there are.
Comments
Post a Comment