This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization 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