?
Solved

Check if textbox was read

Posted on 2015-01-09
1
Medium Priority
?
92 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 34

Accepted Solution

by:
Big Monty earned 2000 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
This article discusses how to implement server side field validation and display customized error messages to the client.
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…
Suggested Courses

862 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