title: Enable asp button only when there is text in the asp textbox
body: <p>Ok, so I have a multiple ASP textboxes and ASP buttons on a page within a multiview.
  The submit button associated with each textbox should be enabled only when there is text entered in the textbox. So, I wrote a Javascript function to handle this and I'm getting an error saying <strong><em>"document.getElementById(...)' is null or not an object"</em></strong></p>
  
  <pre><code>    function checkEmptyTxtBox(val, savebtn) {
          if (val.value.replace(/^\s+|\s+$/g, "") == "")
              document.getElementById(savebtn).disabled = true;
          else
              document.getElementById(savebtn).disabled = false;
      }
  
                     &lt;asp:TextBox 
                      ID="txt_Comments_2" 
                      runat="server" 
                      Wrap="true" 
                      TextMode="MultiLine" 
                      onkeyup="checkEmptyTxtBox(this,'&lt;%= btnSave2.ClientID %&gt;')"&gt;
                   &lt;/asp:TextBox&gt;
  
                   &lt;asp:Button 
                      ID="btnSave2"
                      runat="server"
                      text="Save" 
                      Enabled="False"/&gt;
  </code></pre>
  
  <p>This is on VS2010.</p>