fnReloadAjax and page jump
fnReloadAjax and page jump
I have a link like this:
[code]
link
[/code]
We are using javascript: void(0) to prevent the page from jumping (as in this case it is near the bottom of the page) and it worked fine.
Recently we added a call to fnReloadAjax in the function raiseStyle that is called in the onclick event of the link, but it appears fnReloadAjax causes the page to jump back to the top.
Is there a way to prevent this so the user stays at the bottom of the page during the refresh?
In this case the height of the table is static so maybe we could use that to our advantage?
[code]
link
[/code]
We are using javascript: void(0) to prevent the page from jumping (as in this case it is near the bottom of the page) and it worked fine.
Recently we added a call to fnReloadAjax in the function raiseStyle that is called in the onclick event of the link, but it appears fnReloadAjax causes the page to jump back to the top.
Is there a way to prevent this so the user stays at the bottom of the page during the refresh?
In this case the height of the table is static so maybe we could use that to our advantage?
This discussion has been closed.
Replies
Good to hear you've got a work around for this. Another option would be to record what 'scrollTop' is before calling fnReloadAjax, and then setting it back to what it was in a callback function once the table has fully loaded again.
Allan