Results 1 to 5 of 5

Thread: Detecting if a user has scrolled to the bottom of a scrolling DIV

  1. #1
    Join Date
    Jan 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Detecting if a user has scrolled to the bottom of a scrolling DIV

    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.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Just put 'I agree...' at the bottom of the scrolling div.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  4. #4
    Join Date
    Jun 2006
    Location
    Acton Ontario Canada.
    Posts
    677
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    hide a link so that the user has to read most of the text to find it.
    - Ryan "Boxxertrumps" Trumpa
    Come back once it validates: HTML, CSS, JS.

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by boxxertrumps
    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •