title: on button click, loop through text boxes javascript
body: <p>I am trying to make a function actuated by a button click. On click, a function loops through each input type=text element, assigns their value attribute to variable, if that variable = null or variable = "" call method confirm('are you sure you want to save a blank row').
  Here's my code/pseudo code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function isInputEmpty() {
          $("#btnSave").click(function(){
              $('input[type=text]').each(function(){
                  var x = $(this).attr('value');
                  var bool = false;
                  if(x == null || x == "")
                  {
                      bool = true;
                  }
                  else
                  {
                      send the request
                  }
                  if(bool == true)
                  {
                      if(confirm('Are you sure you want to save a blank URL?'))
                      {
                          send the request
                      }
                      else
                      {
                          do nothing or cancel the request
                      }
                  }
                  else
                  {
                      send the request
                  }
               }
          }
  &lt;/script&gt;
  </code></pre>
  
  <p>Here is my asp button code: </p>
  
  <p><code>&lt;asp:Button ID="btnSave" runat="server" Text="Save"/&gt;</code></p>
  
  <p>If you need more information, please let me know.
  Thanks in advance</p>