Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Getting scroll position using ADF faces and javascript

486234Mar 7 2006 — edited Dec 22 2006
On 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 19 2007
Added on Mar 7 2006
1 comment
440 views