title: Node JS stack. HAving trouble posting ejs data through Jquery and AJAX
body: <p>I'm trying to Post data that's in ejs tags through Ajax using Jquery. Here is my code. It is very much obviously wrong lol</p>
  
  <p>Could anyone give me pointers in how to do this correctly? </p>
  
  <pre><code>$(document).ready(function(){
  $(".subscribeButton").click(function(){
    var userId = "";
  
     userId = '&lt;%=guest.userId%&gt;';
  
     var forumId ="";
  
     forumId="&lt;%=topic.forumId%&gt;";
  
    $.post("/subscriptions",
    {
      userId: userId,
      forumId: forumId
    },
    function(data, status){
      console.log("Data: " + data + "\nStatus: " + status);
    });
  });
  });
  </code></pre>