title: Uncaught syntaxerror missing ) after argument list
body: <p>I am getting the syntax error:</p>
  
  <pre><code>         Uncaught Syntax Error: missing ) after argument list
  </code></pre>
  
  <p>The data in the table appears to be showing up fine. The error appears when I hit the Delete button in the table. But I can't seem to find any issue with the code.</p>
  
  <p>The flow how it works is when I hit the delete button, it opens a model window that asks if I am sure to delete the selected entry and it should delete that once I hit yes. But, when I click on the delete button, I get the pop up window but nothing happens when I hit Yes on the window. It's like to code is stuck.</p>
  
  <hr>
  
  <p>In Main JSP:</p>
  
  <pre><code>       &lt;div id="subjectArea"&gt;
  
         &lt;/div&gt;
  
         &lt;div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt;
      &lt;div class="modal-dialog"&gt;
          &lt;div class="modal-content my-popup"&gt;
              &lt;div class="modal-header"&gt;
                  &lt;button type="button" class="close" data-dismiss="modal"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;
                      &lt;span class="sr-only"&gt;Close&lt;/span&gt;&lt;/button&gt;
                  &lt;h4 class="modal-title" id="myModalLabel"&gt;Delete&lt;/h4&gt;
              &lt;/div&gt;
              &lt;div class="modal-body"&gt;  Are You Sure to Delete? &lt;/div&gt;
              &lt;div class="modal-footer"&gt;
                  &lt;button type="button" class="btn btn-success" id="delete_no" onclick=""&gt;Yes&lt;/button&gt;  &lt;button type="button" class="btn btn-danger" data-dismiss="modal"&gt;No&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
  &lt;/div&gt;
  
  &lt;script&gt;
      function changeDeleteId(x) {
  
          $("#delete_no").attr("onclick","deleteSubjects("+x+")");
      }
  </code></pre>
  
  <h2>    </h2>
  
  <p>In Sub JSP:</p>
  
  <pre><code>         &lt;table width="100%" id="example" class="table table-bordered" cellspacing="0" style="font-size: 14px ; margin-left: 10px; text-align: center; border: 1px solid black;"&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>        &lt;%--Table Headers--%&gt;
  
       &lt;th style="text-align: center"&gt;Sr.&lt;/th&gt;
       &lt;th style="text-align: center"&gt;Code&lt;/th&gt;
       &lt;th style="text-align: center"&gt;Title&lt;/th&gt;
       &lt;th style="text-align: center"&gt;Status&lt;/th&gt;
       &lt;th style="text-align: center"&gt;Actions&lt;/th&gt;
        &lt;/tr&gt;
  
       &lt;c:forEach items="${subjects}" var="subject" varStatus="counter"&gt;
      &lt;tr style="align-items: center"&gt;
          &lt;td style="font-size: 14px ; border: 1px solid black; background-color: white"&gt;${counter.count}&lt;/td&gt;
          &lt;td style="font-size: 14px ; border: 1px solid black; background-color: white"&gt;${subject.subjectCode}&lt;/td&gt;
          &lt;td style="font-size: 14px ; border: 1px solid black; background-color: white"&gt;${subject.subjectName}&lt;/td&gt;
          &lt;td style="font-size: 14px ; border: 1px solid black; background-color: white"&gt;${subject.status}&lt;/td&gt;
          &lt;td style="font-size: 14px ; border: 1px solid black; background-color: white; text-align: center; margin-left: 20px"&gt;
                  &lt;%--&lt;a style="color: green; font-weight: bold" href="${pageContext.request.contextPath}/subject/edit/${subject.subjectId}"&gt;Edit&lt;/a&gt; &amp;nbsp;|&amp;nbsp;--%&gt;
              &lt;a style="text-align: center" href="${pageContext.request.contextPath}/subject/edit/${subject.subjectId}" title="Edit"&gt;&lt;i class="fa fa-pencil-square-o edit"&gt;&lt;/i&gt;&lt;/a&gt; &amp;nbsp; &amp;nbsp;
              &lt;a data-toggle="modal" data-target="#myModal" style="color: red; font-weight: bold" onclick="changeDeleteId(${subject.subjectId})"&gt;&lt;i class="fa fa-trash-o delet"&gt;&lt;/i&gt;&lt;/a&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/c:forEach&gt;
  </code></pre>
  
  <h2></h2>
  
  <p>JavaScript File:</p>
  
  <pre><code>             function deleteSubjects(x) {
  var url = 'delete/' + x;
  
  $.get(url, function(content) {
      $("#subjectArea").html(content);
  }).fail(function() {
      alert("Something Went Wrong, Try Again!")
  });
  }
  </code></pre>