Getting scroll position using ADF faces and javascript
486234Mar 7 2006 — edited Dec 22 2006On my page I have an editable table, and I'm trying to set it up so that the page autoscrolls to the correct position when the edit button is clicked. I'm using javascript for this. Here is the javascript I'm using
function saveScrollCoordinates()
{
var y = document.getElementById('yCoord');
y.value = document.body.scrollTop;
}
This function is called when the form is submitted.
the element yCoord is a hidden field on my ADF faces page
<input type="hidden" value="0" />
<body onload=window.scrollTo(0,yCoord.value);" id="body">
This page is for internal use and will only be viewed on IE
The problem I'm having is the value of yCoord is always 0.
Thanks in advance for any help.