title: Get rid of button, and have it's effects just be automatic
body: <p>I've made my html auto refresh every 60 seconds, but it needs the button to be pressed again, would rather just ditch the button and have it's effects just automatically happen when the html is run.</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
      &lt;meta http-equiv=&quot;refresh&quot; content=&quot;60&quot;&gt;
      &lt;title&gt;CSV File to HTML Table Using AJAX jQuery&lt;/title&gt;
      &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js&quot;&gt;&lt;/script&gt;
      &lt;link rel=&quot;stylesheet&quot; href=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css&quot; /&gt;
      &lt;script src=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js&quot;&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;div class=&quot;container&quot;&gt;
          &lt;div class=&quot;table-responsive&quot;&gt;
              &lt;h1 align=&quot;center&quot;&gt;CSV File to HTML Table Using AJAX jQuery&lt;/h1&gt;
              &lt;br /&gt;
              &lt;div align=&quot;center&quot;&gt;
                  &lt;button type=&quot;button&quot; name=&quot;load_data&quot; id=&quot;load_data&quot; class=&quot;btn btn-info&quot;&gt;Load Data&lt;/button&gt;
              &lt;/div&gt;
              &lt;br /&gt;
              &lt;div id=&quot;employee_table&quot;&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  
  &lt;script&gt;
      $(document).ready(function () {
          $('#load_data').click(function () {
              $.ajax({
                  url: &quot;employee.csv&quot;,
                  dataType: &quot;text&quot;,
                  success: function (data) {
                      var employee_data = data.split(/\r?\n|\r/);
                      var table_data = '&lt;table class=&quot;table table-bordered table-striped&quot;&gt;';
                      for (var count = 0; count &lt; employee_data.length; count++) {
                          var cell_data = employee_data[count].split(&quot;,&quot;);
                          table_data += '&lt;tr&gt;';
                          for (var cell_count = 0; cell_count &lt; cell_data.length; cell_count++) {
                              if (count === 0) {
                                  table_data += '&lt;th&gt;' + cell_data[cell_count] + '&lt;/th&gt;';
                              }
                              else {
                                  table_data += '&lt;td&gt;' + cell_data[cell_count] + '&lt;/td&gt;';
                              }
                          }
                          table_data += '&lt;/tr&gt;';
                      }
                      table_data += '&lt;/table&gt;';
                      $('#employee_table').html(table_data);
                  }
              });
          });
  
      });
  &lt;/script&gt;
  </code></pre>
  <p>It won't let me submit without adding more, not sure what else to add, the contents of the csv file are going to routinely change, so that's why the website will need to auto-refresh.</p>