M
Martin
I have a page that contains an iframe. In the iframe is a table that
contains a couple hundred rows of data. When the user clicks on a
"Refresh" button on the page, I would like to capture the current
scrollTop value of the table and pass it back to the server (where it
will be returned to the refreshed page and a scrollTo will be done
when the page has finished loading).
I have the code functioning to do the actual scrolling when the page
reloads - using dummy values like scrollTo(0,500) - but I can't figure
out how to get the current position so it can be passed to the
refreshed page.
I've tried:
document.getElementById("iframe_DL").contentDocument.scrollTop()
and several variations but can't get anything to work.
Can someone tell me how to do this?
And before anyone asks:
* No the page is not available for viewing. It's part of a user
interface to a machine and is used only on a LAN.
* Javascript will be functional on all users computers. It's already
being used throughout this application.
* Yes, the page in the iframe is served out by the same server that
sends out the main page.
contains a couple hundred rows of data. When the user clicks on a
"Refresh" button on the page, I would like to capture the current
scrollTop value of the table and pass it back to the server (where it
will be returned to the refreshed page and a scrollTo will be done
when the page has finished loading).
I have the code functioning to do the actual scrolling when the page
reloads - using dummy values like scrollTo(0,500) - but I can't figure
out how to get the current position so it can be passed to the
refreshed page.
I've tried:
document.getElementById("iframe_DL").contentDocument.scrollTop()
and several variations but can't get anything to work.
Can someone tell me how to do this?
And before anyone asks:
* No the page is not available for viewing. It's part of a user
interface to a machine and is used only on a LAN.
* Javascript will be functional on all users computers. It's already
being used throughout this application.
* Yes, the page in the iframe is served out by the same server that
sends out the main page.