title: Clicking on the html table row's Edit link to populate EditDATA_form field. The tables data are being populated by servlet response to jsp
body: <p>I want to populate form field with the table's row data which is populated like this</p>
  
  <pre><code>  &lt;table  class="data-table" border="1"&gt;
          &lt;tr&gt;
          &lt;td&gt;Student ID&lt;/td&gt;
          &lt;td&gt;First Name&lt;/td&gt;
          &lt;td&gt;Last Name&lt;/td&gt;
          &lt;td&gt;Year Level&lt;/td&gt;
          &lt;/tr&gt;
  
          &lt;c:forEach items="${allStudents}" var="stud"&gt;
              &lt;tr&gt;
                  &lt;td&gt;${stud.studentId}&lt;/td&gt;
                  &lt;td&gt;${stud.firstname}&lt;/td&gt;
                  &lt;td&gt;${stud.lastname}&lt;/td&gt;
                  &lt;td&gt;${stud.yearLevel}&lt;/td&gt;
                  &lt;td&gt;&lt;a href='javascript:void(0);' class='edit_doc'&gt;Edit&lt;/a&gt;&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/c:forEach&gt;
              &lt;/table&gt;
  </code></pre>
  
  <p>Now I want to write Jquery (which is completely new to me). I have gone through many of example and asked about the same.But the jquery did not work for me.Can any one please tell what to write in scripts tag?Please also do share code if possible.</p>
  
  <p>//form on the jsp</p>
  
  <pre><code>   &lt;form name="frm" class="data-form" action="./StudentServlet" method="POST" onSubmit="return validateForm()"&gt;
              &lt;tr&gt;
                  &lt;td&gt;&lt;strong&gt;Student ID --&gt;&lt;/strong&gt;&lt;input type="text" class='input1'  name="studentId" value="${student.studentId}" /&gt; &lt;/td&gt;
                  &lt;td&gt;&lt;strong&gt;First Name --&gt;&lt;/strong&gt;&lt;input type="text" class='input2' name="firstname" value="${student.firstname}" /&gt; &lt;/td&gt;
                  &lt;td&gt;&lt;strong&gt;Last Name --&gt;&lt;/strong&gt; &lt;input type="text" class='input3' name="lastname" value="${student.lastname}" /&gt; &lt;/td&gt;
                  &lt;td&gt;&lt;strong&gt;Year Level --&gt;&lt;/strong&gt;&lt;input type="text" class='input4' name="yearLevel" value="${student.yearLevel}" /&gt; &lt;/td&gt;
              &lt;/tr&gt;   
        &lt;/form&gt;
  </code></pre>
  
  <p>//Scripts</p>
  
  <pre><code>//what goes here
  </code></pre>