I would check out the scrollTop and scrollHeight properties of the
textarea control. The scrollTop will tell you how far down the control
is scrolled, and the scrollHeight tells you the total scrollable length
- I think you would want to handle the onscroll property, and ensure
these values are even.
*** completely untested code snippet ***
<script language="JavaS cript">
function myTextArea_OnSc roll(myTextArea ) {
if (myTextArea.scr ollTop == myTextArea.scro llHeight) {
document.getEle mentById('myChe ckBox').disable d = false;
}// end if
} // end myTextArea_OnSc roll function
</script>
<textarea onscroll="myTex tArea_OnScroll( this);"></textarea>
<input type="checkbox" id="myCheckBox " disabled>
Happy Coding!
Mike Brophy wrote:
Here's my problem: I need to present text in a scrolling textarea such
that a checkbox is not enabled until the user has scrolled to the very
last line of the text using the vertical scrollbar.
Been searching for some functions to get scrollbar position for a
textarea object but coming up empty.
A nudge in the right direction would be appreciated. Thanks.