views:

165

answers:

1

Hello,

I am working on an asp.net page and I have a multiline text box that displays some text. I want the user to have to scroll all the way to the bottom before I display a checkbox for them to continue. My question is how can you tell if the scroll bar is at the bottom?

+1  A: 

By using javascript:

in Internet Explorer: document.body.scrollLeft document.body.scrollTop

in Netscape: window.pageXOffset window.pageYOffset

Kolten
that'll give me the dimensions but what do I compare to so I know it's the bottom?
jumbojs
from the top of my head:if (theTextBox.scrollTop == theTextBox.scrollHeight){theCheckBox.visible = true;}
Kolten