...

View Full Version : Detecting layer scroll movement...?



metazai
06-11-2004, 01:24 AM
A simple question, a complicated answer (unless the answer is "no", of course).

I have a basic layer as described in the code below. With overflow set to "auto", a scrollbar appears in all current browser versions I have tested. Is there a way to detect that the scrollbar has been dragged all the way down to the bottom of the text? I am trying to get people to read instructions before click on an "I have read the instructions" box, and so I'd like to get an event to enable focus on the checkbox.


<div style="position:relative; width:400px; height:300px; background-color:#ffffff; overflow:auto;">
Lots of text
</div>
<input type="checkbox" value="agree" name="cBox" />


Any ideas?

neofibril
06-11-2004, 02:08 AM
<div style="position:relative; width:400px; height:300px; background-color:#ffffff; overflow:auto;">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?
<hr>
<label><em>I have read the instructions </em></label><input type="checkbox" value="agree" name="cBox" />
</div>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum