I have a scenario where I have redirected the user to a particular
url, something like:
http://www.example.com/taskmanager/edit_task/5#comment_4
In other words, they are viewing a particular comment associated with
task 5. This comment is say a page or two down (ie, scrolled down)
from the top of the page where there are fields associated with task
5.
Now the user scrolls up to the top of the page, which puts them as if
they were viewing task 5 from its main url, ie
http://www.example.com/taskamanger/edit_task/5
They make some change to the task - say change the due date. But they
make an error which is caught on the server side. When my server code
runs, it calls render_to_response to re-render the page to display the
error. Howevever, because their original url was
http://www.example.com/taskmanager/edit_task/5#comment_4
they are now taken back to the page with comment_4 in their view,
rather than to the top of the page where their error is.
Is there a way for me to get rid of the #comment_4 anchor in the url,
so that they are taken back to the top of the page when
render_to_response() is called?
Thanks,
Margie