Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Enabling a check box based on the position of scroll bar in a text area..

 
Supreet Malaviya
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I don't have much idea about javascript...
In one of my recent project requirements for a Web Application, I have to enable a check box based on whether a user has scrolled till end in the agreement text.
The agreement text is present in a textarea and the checkbox (by checking on which, the user agrees to the terms and conditions mentioned in the text area) is present outside the text area. The user should be able to check the checkbox only when he/she has scrolled till the end in the textarea.

Anyone has any idea as to how this thing can be done using javascript?

Thanks,
Supreet Malaviya.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
onscroll and scrollTop is probably what you are after.

Eric
 
Supreet Malaviya
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply Eric....

Supreet Malaviya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic