title: Error at accessing database table data in javascript
body: <p>I have a database table and I am listing it into a jsp table. I have author names, titles, dates and quantities in it. I want to make an edit function and to display the current id with its corresponding data. I have managed to access all the data, but the author and the title. I am using the same method, accesing them through javascript, but it gives me this error for title and author:
  <code>Uncaught ReferenceError: MP is not defined at HTMLButtonElement.onclick</code>
  where "MP" is an author name. I don't understand how the code manages to see the current author's name, but not display it in the edit field and thus triggering the error... I have simplified the function down there, to see what is triggering my error... </p>
  
  <pre><code>  &lt;c:forEach var="book" items="${bookAttribute}"&gt;
      &lt;tr id="book_${book.id}"&gt;
          &lt;td&gt;&lt;c:out value="${book.author}"/&gt;&lt;/td&gt;
  
  
  
   &lt;button class="button" id="editButton_${book.id}" type="submit" name="editButton" onclick="editBooks(${book.author})"&gt;
  &lt;/button&gt;
  
  
  
  
  function editBooks(author) {
          document.getElementById("authorText").value = author;
  }
  
  </code></pre>