title: Object doesn't support property or method 'dataTable' error
body: <p>On my previous question, I have added the JQuery library and have fixed my style errors, however, I am now getting a new error: "Object doesn't support property or method 'dataTable'.</p>
  
  <p>Here is my updated HTML code:</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;script type="text/javascript" src="/CensusDatabase/js/jquery-1.9.1.min.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" charset="utf-8" src="/CensusDatabase/js/jquery.dataTables-1.9.4.min.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="/CensusDatabase/js/DrawTable.js"&gt;&lt;/script&gt;
          &lt;title&gt;My Census Data&lt;/title&gt;
          &lt;style type="text/css"&gt;
              body {
                  color: black;
                  background-color: #ffaacc;
                  font-family:"Trebuchet MS", "Calibri", sans-serif
              }
              h1 {
                  font-family:"Trebuchet MS", "Calibri", sans-serif
              }
          &lt;/style&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
           &lt;h1&gt;My Census Data&lt;/h1&gt;
  
          &lt;div class="census"&gt;
              &lt;div id="block-system-main"&gt;
                   &lt;h2&gt;Reports&lt;/h2&gt;
  
                  &lt;ul&gt;
                      &lt;li&gt;&lt;a href="#" onclick="nationalAgeGender()"&gt;National age and gender data&lt;/a&gt;
                      &lt;/li&gt;
                      &lt;li&gt;&lt;a href="#" onclick="arizonaAgeGender()"&gt;Arizona age and gender data&lt;/a&gt;
                      &lt;/li&gt;
                      &lt;li&gt;&lt;a href="#" onclick="combinedAgeGender()"&gt;Combined age and gender data&lt;/a&gt;
                      &lt;/li&gt;
                      &lt;li&gt;&lt;a href="#" onclick="nationalRace()"&gt;National race data&lt;/a&gt;
                      &lt;/li&gt;
                      &lt;li&gt;&lt;a href="#" onclick="arizonaRace()"&gt;Arizona race data&lt;/a&gt;
                      &lt;/li&gt;
                      &lt;li&gt;&lt;a href="#" onclick="combinedRace()"&gt;Combined race data&lt;/a&gt;
                      &lt;/li&gt;
                  &lt;/ul&gt;
                  &lt;div id="reportsData"&gt;&lt;i&gt;Please select a report to display.&lt;/i&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And here is my JavaScript code, again:</p>
  
  <pre><code>function nationalAgeGender() {
      (function ($) {
          $('#data').html('&lt;table width="100%" cellspacing="3" cellpadding="0" id="data-entry"&gt;&lt;/table&gt;');
          $('#data-entry').dataTable({
              "bProcessing": true,
              "bScrollInfinite": true,
              "sScrollX": "160%",
              "bScrollCollapse": true,
              "bAutoWidth": false,
              "sScrollY": "100%",
              "iDisplayLength": -1,
              "sDom": '&lt;"top"&gt;rt&lt;"bottom"&gt;',
              "aaSorting": [],
              "sAjaxSource": "/CensusDatabase/database_scripts/NationalAgeGender.php",
              "aoColumns": [{
                      "sTitle": "Age group"
                  }, {
                      "sTitle": "Total population (both genders)"
                  }, {
                      "sTitle": "Male population"
                  }, {
                      "sTitle": "Female population"
                  }, {
                      "sTitle": "% (both genders)"
                  }, {
                      "sTitle": "Male %"
                  }, {
                      "sTitle": "Female %"
                  }
              ]
  
          });
      })(jQuery);
  }
  
  function arizonaAgeGender() {
      (function ($) {
          $('#data').html('&lt;table width="100%" cellspacing="3" cellpadding="0" id="data-entry"&gt;&lt;/table&gt;');
          $('#data-entry').dataTable({
              "bProcessing": true,
              "bScrollInfinite": true,
              "sScrollX": "160%",
              "bScrollCollapse": true,
              "bAutoWidth": false,
              "sScrollY": "100%",
              "iDisplayLength": -1,
              "sDom": '&lt;"top"&gt;rt&lt;"bottom"&gt;',
              "aaSorting": [],
              "sAjaxSource": "/CensusDatabase/database_scripts/ArizonaAgeGender.php",
              "aoColumns": [{
                      "sTitle": "Age group"
                  }, {
                      "sTitle": "Total population (both genders)"
                  }, {
                      "sTitle": "Male population"
                  }, {
                      "sTitle": "Female population"
                  }, {
                      "sTitle": "% (both genders)"
                  }, {
                      "sTitle": "Male %"
                  }, {
                      "sTitle": "Female %"
                  }
  
              ]
  
          });
      })(jQuery);
  }
  
  function combinedAgeGender() {
      (function ($) {
          $('#data').html('&lt;table width="100%" cellspacing="3" cellpadding="0" id="data-entry"&gt;&lt;/table&gt;');
          $('#data-entry').dataTable({
              "bProcessing": true,
              "bScrollInfinite": true,
              "sScrollX": "160%",
              "bScrollCollapse": true,
              "bAutoWidth": false,
              "sScrollY": "100%",
              "iDisplayLength": -1,
              "sDom": '&lt;"top"&gt;rt&lt;"bottom"&gt;',
              "aaSorting": [],
              "sAjaxSource": "/CensusDatabase/database_scripts/CombinedAgeGender.php",
              "aoColumns": [{
                      "sTitle": "Age group"
                  }, {
                      "sTitle": "National total population (both genders)"
                  }, {
                      "sTitle": "National male population"
                  }, {
                      "sTitle": "National female population"
                  }, {
                      "sTitle": "National % (both genders)"
                  }, {
                      "sTitle": "National male %"
                  }, {
                      "sTitle": "National female %"
                  }, {
                      "sTitle": "Arizona total population (both genders)"
                  }, {
                      "sTitle": "Arizona male population"
                  }, {
                      "sTitle": "Arizona female population"
                  }, {
                      "sTitle": "Arizona % (both genders)"
                  }, {
                      "sTitle": "Arizona male %"
                  }, {
                      "sTitle": "Arizona female %"
                  }
              ]
  
          });
      })(jQuery);
  }
  
  function nationalRace() {
      (function ($) {
          $('#data').html('&lt;table width="100%" cellspacing="3" cellpadding="0" id="data-entry"&gt;&lt;/table&gt;');
          $('#data-entry').dataTable({
              "bProcessing": true,
              "bScrollInfinite": true,
              "sScrollX": "160%",
              "bScrollCollapse": true,
              "bAutoWidth": false,
              "sScrollY": "100%",
              "iDisplayLength": -1,
              "sDom": '&lt;"top"&gt;rt&lt;"bottom"&gt;',
              "aaSorting": [],
              "sAjaxSource": "/CensusDatabase/database_scripts/NationalRace.php",
              "aoColumns": [{
                      "sTitle": "Category"
                  }, {
                      "sTitle": "White"
                  }, {
                      "sTitle": "White %"
                  }, {
                      "sTitle": "Black or African-American"
                  }, {
                      "sTitle": "Black or African-American %"
                  }, {
                      "sTitle": "Native American"
                  }, {
                      "sTitle": "Native American %"
                  }, {
                      "sTitle": "Asian"
                  }, {
                      "sTitle": "Asian %"
                  }, {
                      "sTitle": "Native Hawaiian or Pacific Islander"
                  }, {
                      "sTitle": "Native Hawaiian or Pacific Islander %"
                  }, {
                      "sTitle": "Some other race"
                  }, {
                      "sTitle": "Some other race %"
                  }
              ]
  
          });
      })(jQuery);
  }
  
  function arizonaRace() {
      (function ($) {
          $('#data').html('&lt;table width="100%" cellspacing="3" cellpadding="0" id="data-entry"&gt;&lt;/table&gt;');
          $('#data-entry').dataTable({
              "bProcessing": true,
              "bScrollInfinite": true,
              "sScrollX": "160%",
              "bScrollCollapse": true,
              "bAutoWidth": false,
              "sScrollY": "100%",
              "iDisplayLength": -1,
              "sDom": '&lt;"top"&gt;rt&lt;"bottom"&gt;',
              "aaSorting": [],
              "sAjaxSource": "/CensusDatabase/database_scripts/ArizonaRace.php",
              "aoColumns": [{
                      "sTitle": "Category"
                  }, {
                      "sTitle": "White"
                  }, {
                      "sTitle": "White %"
                  }, {
                      "sTitle": "Black or African-American"
                  }, {
                      "sTitle": "Black or African-American %"
                  }, {
                      "sTitle": "Native American"
                  }, {
                      "sTitle": "Native American %"
                  }, {
                      "sTitle": "Asian"
                  }, {
                      "sTitle": "Asian %"
                  }, {
                      "sTitle": "Native Hawaiian or Pacific Islander"
                  }, {
                      "sTitle": "Native Hawaiian or Pacific Islander %"
                  }, {
                      "sTitle": "Some other race"
                  }, {
                      "sTitle": "Some other race %"
                  }
              ]
  
          });
      })(jQuery);
  }
  
  function combinedRace() {
      (function ($) {
          $('#data').html('&lt;table width="100%" cellspacing="3" cellpadding="0" id="data-entry"&gt;&lt;/table&gt;');
          $('#data-entry').dataTable({
              "bProcessing": true,
              "bScrollInfinite": true,
              "sScrollX": "160%",
              "bScrollCollapse": true,
              "bAutoWidth": false,
              "sScrollY": "100%",
              "iDisplayLength": -1,
              "sDom": '&lt;"top"&gt;rt&lt;"bottom"&gt;',
              "aaSorting": [],
              "sAjaxSource": "/CensusDatabase/database_scripts/NationalRace.php",
              "aoColumns": [{
                      "sTitle": "Category"
                  }, {
                      "sTitle": "White (National)"
                  }, {
                      "sTitle": "White % (National)"
                  }, {
                      "sTitle": "Black or African-American (National)"
                  }, {
                      "sTitle": "Black or African-American % (National)"
                  }, {
                      "sTitle": "Native American (National)"
                  }, {
                      "sTitle": "Native American % (National)"
                  }, {
                      "sTitle": "Asian (National)"
                  }, {
                      "sTitle": "Asian % (National)"
                  }, {
                      "sTitle": "Native Hawaiian or Pacific Islander (National)"
                  }, {
                      "sTitle": "Native Hawaiian or Pacific Islander % (National)"
                  }, {
                      "sTitle": "Some other race (National)"
                  }, {
                      "sTitle": "Some other race % (National)"
                  }, , {
                      "sTitle": "White (Arizona)"
                  }, {
                      "sTitle": "White % (Arizona)"
                  }, {
                      "sTitle": "Black or African-American (Arizona)"
                  }, {
                      "sTitle": "Black or African-American % (Arizona)"
                  }, {
                      "sTitle": "Native American (Arizona)"
                  }, {
                      "sTitle": "Native American % (Arizona)"
                  }, {
                      "sTitle": "Asian (Arizona)"
                  }, {
                      "sTitle": "Asian % (Arizona)"
                  }, {
                      "sTitle": "Native Hawaiian or Pacific Islander (Arizona)"
                  }, {
                      "sTitle": "Native Hawaiian or Pacific Islander % (Arizona)"
                  }, {
                      "sTitle": "Some other race (Arizona)"
                  }, {
                      "sTitle": "Some other race % (Arizona)"
                  }
              ]
  
          });
      })(jQuery);
  }
  </code></pre>
  
  <p>Does anyone know what the problem is now?</p>