title: pass jstl foreach variable to javascript function
body: <p>I use jstl foreach loop to show my data.User can change the value and finally I want to send these data to server via jquery.
  my problem is how can I pass loop variable to my jquery function when user changed the data and click on 'ok' button.
  I used <code>
  &lt;c:set var="chequeInfo" value="${cheque.chequeNo}~${cheque.amount}~${cheque.chequeDate}"/&gt;</code>
  to pass <code>chequeInfo</code> to <code>registerEdit()</code> function. but the value of this variable didn't change when user edit my data</p>
  
  <pre><code>&lt;c:forEach items="${chequeList}" var="cheque"&gt;
  &lt;div class="row"&gt;
      &lt;input class="date" type="text"
             value="${cheque.chequeDate}"&gt;
  
      &lt;select id="chequeStatus"&gt;
          &lt;c:forEach items="${chequeStatus}" var="status"&gt;
              &lt;option value="${status.id}"&gt;${status.farsiName}&lt;/option&gt;
          &lt;/c:forEach&gt;
      &lt;/select&gt;
  
      &lt;label class="col-lg-3"&gt;${cheque.chequeNo} &lt;/label&gt;
  
      &lt;input type="text" value="${cheque.amount}"&gt;
  
      &lt;button class="col-lg-offset-1 col-lg-1 btn btn-default register-edit"
              onclick="registerEdit('${cheque}','${status.id}')"&gt;ok
      &lt;/button&gt;
  &lt;/div&gt;
  &lt;/c:forEach&gt;
  </code></pre>
  
  <p>how can I send <code>${cheque}</code> and <code>${status.id}</code> to <code>registerEdit()</code> function. Thank you</p>