title: parsing variable from javascript to html twig
body: <p>I started using html twig in Symfony2 and I got the following problem:</p>
  
  <pre><code>function goEditConflict(){
      $("#go").on("click", function(){
      id = $("#case_number").val();
  
      windows.location = {{ path("acf_case_conflict_edit", {"id" : id}) }} ;
      });
  }
  </code></pre>
  
  <blockquote>
    <p>Variable "id" does not exist in
    ACFCaseBundle:Shared:caseHierachy.js.twig at line 38</p>
  </blockquote>
  
  <p>I try to redirect page base on the id variable but I got the error that when I try redirect to <code>{{ path("acf_case_conflict_edit", {"id" : id}) }}</code> the variable does not exist. </p>
  
  <p>How can I use a js variable in my twig code?</p>