title: not rendering page on request node.js
body: <p>I have this front-end function:</p>
  <pre><code> var finalSelValue = &quot;&quot;
      function changeFunc() {
       var selectBox = document.getElementById(&quot;selectBox&quot;);
       var selectedValue = selectBox.options[selectBox.selectedIndex].value;
  
     finalSelValue = selectedValue
      fetch('/adminFilter', {
          method: 'POST',
          headers: {'content-type': 'application/json'},
          body: JSON.stringify({
              finalSelValue
          })
      })
      }
  </code></pre>
  <p>and then this on the backend:</p>
  <pre><code>  router.post('/adminFilter', auth.ensureAuthenticated, auth.roleCheck('ADMIN'), (req, res) =&gt; {
  
    console.log(&quot;filter &quot; + req.body.finalSelValue)
  
    var query = &quot;select * from tkwdottawa where STATUS = '&quot; + req.body.finalSelValue + &quot;'&quot;
    ibmdb.open(DBCredentials.getDBCredentials(), function(err, conn) {
        if (err) return console.log(err);
        conn.query(query, function(err, rows) {
            if (err) {
                res.writeHead(404);
  
            }
  
            for (var i = 0; i &lt; rows.length; i++) {
              console.log(rows[i])
            }
  
            res.render('AdminDash', {
                page_title: &quot;AdminDash&quot;,
                data: rows
            });
  
  
            conn.close(function() {
                console.log('done adminFilter');
  
            });
        });
    });
  
  
  })
  </code></pre>
  <p>it is logging the new values properly, where the loop is, but it is not re-rendering the page with the new data! How do I fix this!</p>