I am trying to refresh the page with this statement in external javascript file after some processes.
window.location.href = window.location.href
It perfectly reload the page but I want to scroll to the specific location after reload. So, I put this on the page.
<a name="uploadImgSection"></a>
And change the javascript to
window.location.href = window.location.href + "#mypara";
This code doesn't reload/refresh the page either
window.location.hash = "#uploadImgSection";
window.location.href = window.location.href;
When I do that, it doesn't reload the page at all. Is there any way I can reload the page with scroll bar position?
window.location.href
? if you are doing that on page load and you are hitting f5 and you are using firefox (or other browser that scrolls where you were before the f5 on refresh) this might be the problem