title: How can I attach a function to an onClick event using Angel/Jael?
body: <p>I need to update table results when a "Next" button is pressed using Angel and Jael.</p>
  
  <p>Currently, this is the code I have:</p>
  
  <p><code>&lt;button class="next" type="button" onclick="{{ nextPage }}"&gt;Next Page&lt;/button&gt;</code></p>
  
  <pre><code>    var regbattles = Pagination(await getUnrankedBattles(), 30);
      updatePage() {
        regbattles.nextPage();
      }
      app.get('/', (req, res) async {
        await res.render('index', {'regbattles': regbattles.currentItems, 'nextPage': updatePage});
      });
  </code></pre>
  
  <p>I've tried adding <code>()</code> to <code>nextPage</code> in the onclick function, and it did not work. I can't seem to find any tutorials for this. Does anyone know how to do this?</p>