title: AJAX function not getting called - Database not getting called?
body: <p>I'm trying to get my project running on the localhost. I'm having a problem with the built-in ajax function upon success. Here is the javascript function:</p>
  <pre><code>function getDecisions(page, searchstring) {
      page = typeof page !== 'undefined' ? page : 1;
      searchstring = typeof searchstring !== 'undefined' ? searchstring : '';
  
      $('.loading-container').show();
      if (searchstring != '') {
              params = searchstring;
      }
      else {
              params = getFilterObj();
              params['page'] = page;
  
              //Only get checked types
              $('#types input[type=&quot;checkbox&quot;]').each(function() {
                      if ( $(this).is(&quot;:checked&quot;) ) {
                              params[$(this).attr(&quot;name&quot;)] = 'True';
                      }
              });
      }
  
      if ( $('input[name=&quot;approved-only&quot;]:checked').val() == 'yes' ) {
              params['approved-only'] = 'yes';
      }
  
      $.ajax({
              url:'/dh',
              data: params,
              success: function(data) {
                      
                      info = data.info;
                      newhtml = '';
  
                      if (info.length == 0) {
                              newhtml += '&lt;tr&gt;&lt;td colspan=&quot;18&quot; style=&quot;text-align: center;&quot;&gt;No results returned&lt;/td&gt;&lt;/tr&gt;\n';
                      }
  ...
  }
  </code></pre>
  <p>I know that the javascript function is working as I'm stepping through until the very last line of the function, but I'm not even sure if the ajax function is being called. I'm getting the following Internal Server Error (500):</p>
  <p><a href="https://i.stack.imgur.com/uWwLl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uWwLl.png" alt="enter image description here" /></a></p>
  <p>Can anyone say what could be causing a 500 error on the localhost for this type of an ajax call? Or how I might see whether the ajax function is being called?</p>