PDA

View Full Version : Detecting if a user has scrolled to the bottom of a scrolling DIV



zeeman48
10-14-2006, 04:18 AM
I have a website that requires you to read a TOS agreement before entering. I'd like to know if there is a way to use a DIV like the one seen in the registration screen for this forum and a JavaScript that will detect when you reach the bottom of the agreement. This way, the user has to at least scroll to the bottom before continuing.

jscheuer1
10-14-2006, 08:05 AM
In theory this can be done. However, in practice it can get tricky as different browsers see things differently when it comes to the offsetHeight of a division. This could easily result in users being denied access even if they had read the TOS. Also, javascript can be disabled and scrolling without reading is also very easy. I would spend my time on something else if I were you. Perhaps add a checkbox that says "I attest that I have read and agree to . . . " If it is really critical, have them email you something to that effect for later approval.

tech_support
10-14-2006, 10:33 PM
Just put 'I agree...' at the bottom of the scrolling div.

boxxertrumps
10-15-2006, 12:23 AM
hide a link so that the user has to read most of the text to find it.

jscheuer1
10-15-2006, 02:45 AM
hide a link so that the user has to read most of the text to find it.

That would probably result in more confusion, even among folks that were to read the TOS, than it would be worth.

The whole point of a TOS is to put users on notice that there is a TOS and of what the terms are. If they choose not to read it and end up violating it, or read it and later disregard it, there really isn't that much you can do about it except take action appropriate to the infraction if and when it occurs. The only sure fire way of insuring that they have read it is to require a test like - that they send you an email 'in their own words' describing the meaning of the terms - or having them take and pass a radio button quiz on the important points before gaining access.

I like the quiz idea. It would need to be done server side though, if it really is that critical. Still, this is all overkill in most situations.