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="JavaScript">
function myTextArea_OnScroll(myTextArea) {
if (myTextArea.scrollTop == myTextArea.scrollHeight) {
document.getElementById('myCheckBox').disabled = false;
}// end if
} // end myTextArea_OnScroll function
</script>
<textarea onscroll="myTextArea_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.