title: Disable/Enable button conditionally based on scroll position
body: <p>I need to activate a checkbox once a user has scrolled to the bottom of a terms and conditions section of a form. The will be a section in part of a checkout page for ecommerce site.</p>
  
  <p>I have seen arguments on here about this, but per our lawyers, it has to be this way on our site for liability reasons. An accept button at the end of the scroll box would be the last resort, as it seems to confuse some of our users who think it is not there at all no matter how much info we give them about where the button is.</p>
  
  <p>I sourced <a href="http://www.27seconds.com/kb/article_view.aspx?id=56" rel="noreferrer">this</a> code and manipulated it to try and get it to do what I wanted. My code is listed below. It doesn't work. I have successfully disabled the button, however I cannot seem to reactivate it.</p>
  
  <p>I am pretty new to javascript and any help would be greatly appreciated. </p>
  
  <pre><code>   &lt;head&gt;
      &lt;title&gt;Scroll Test&lt;/title&gt;
      &lt;script language="JavaScript"&gt;
      &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;form name="form22" action="javascript: alert('Form submitted!');" onSubmit="return formValidation(this);"&gt;
  
      &lt;p&gt;
      License Agreement:&lt;br /&gt;
      &lt;textarea name="licenseAgreement" rows="10" cols="45"&gt;This is my long, long license agreement where you agree to all of my demands.
  
      This is my long, long license agreement where you agree to all of my demands.
  
      This is my long, long license agreement where you agree to all of my demands.
  
      This is my long, long license agreement where you agree to all of my demands.
  
      This is my long, long license agreement where you agree to all of my demands.
  
      This is my long, long license agreement where you agree to all of my demands.
  
      This is my long, long license agreement where you agree to all of my demands.
  
      This is my long, long license agreement where you agree to all of my demands.
  
      This is my long, long license agreement where you agree to all of my demands.
  
  &lt;/textarea&gt;
      &lt;/p&gt;
  
      &lt;p&gt;
      &lt;input name="button" type="checkbox" value="Submit" disabled&gt; I agree
      &lt;/p&gt;
  
  &lt;/form&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>