title: Javascript onclick function undefined
body: <p>I have problem with onclick function </p>
  
  <p>My link</p>
  
  <pre><code>&lt;a id="reply" onclick="replyFunction({{$review-&gt;id}})"class="right-button"&gt;Reply&lt;/a&gt;
  </code></pre>
  
  <p>Function:</p>
  
  <pre><code>function replyFunction(id){
    $('#reply').closest('div').append( $('.replyform'));
    $('.replyform').show();
    $('.replyform').attr('action', "/reply/submit/" + id);              
  }
  </code></pre>
  
  <p>Somehow this doesnt work I am getting</p>
  
  <blockquote>
    <p>(index):155 Uncaught ReferenceError: replyFunction is not defined
        at HTMLAnchorElement.onclick </p>
  </blockquote>
  
  <p>I have included the file and it should work i think.</p>
  
  <p>What I am trying to do is to pass id to the function. Basically a user presses reply button onclick function should send parent id and with javascript I should change form that user will fill action with the parent id so I get the right route (I am working with laravel).</p>
  
  <p>P.S. If there is an easier way to do this that I am missing would be glad to hear it.</p>