Solved

Check if textbox was read

Posted on 2015-01-09
1
85 Views
Last Modified: 2015-01-11
I have a textbox with terms and conditions.
i want to make sure my user actually scrolls through the text box.
How can I check to see if the scroll bar is at the same point as the height of the box?
0
Comment
Question by:rivkamak
1 Comment
 
LVL 33

Accepted Solution

by:
Big Monty earned 500 total points
ID: 40540788
if you use jquery, you could do it like this:

jQuery(function($) {
    $('#txtBox').bind('scroll', function() {
        if($(this).scrollTop() + $(this).innerHeight() >= this.scrollHeight) {
            alert('end reached');
            //-- i would set a flag here so that when you submit your form, check the flag and if it's true, continue submitting
        }
    })
});

Open in new window

0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

822 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question