title: Using POST in jQuery with ASP.NET MVC
body: <p>I the site is on the following URL <code>localhost:xxxx/VnosPrijavnica/Predmeti/123456</code>, where the <code>VnosPrijavnica</code> is the controller, <code>Predmeti</code> is an action in the controller, and <code>123456</code> is an optional param (everything is defined correctly in Global.asax). The site loads fine, just when it comes to jQuery's <code>$.post()</code> I encoutered a problem. The jQuery code looks like this: </p>
  
  <pre><code>$("#predmet").change(function () {
      $("#predmet option[value='prazen']").hide();
      $.post("/VnosPrijavnica/PoisciRoke", $("#kriteriji").serialize(), function (data) {
          $("#roki").html(data);
      });
  });
  </code></pre>
  
  <p>The <code>$.post()</code> never executes. I noticed if I change the URL to <code>localhost:xxxx/VnosPrijavnica</code> this piece of jQuery code works as intended. The question is what must I modify in the jQuery code that it will work with the first URL as it does in the second?</p>