Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

259
Views
table data displaying outside the table

i have a jsp page where iam fetching data from DB. i want to display this data as accordion in table row. but the accordion is displaying outside the table, inside table only values are displaying. i want accordion as table row when i click on this table row it should expand.

<table class="content-table">
<thead>
   <tr>
      <th>h1</th>
      <th>h2</th>
      <th>h3</th>
   </tr>
</thead>
<tbody>
<%
    String strQuery = "select * from mytable;
    Connection conn = null;
    PreparedStatement ps = null;
    ResultSet rs = null;
    try {
        conn = precert.Databasebean.getConnectionS();
        ps = conn.prepareStatement(strQuery);
        rs = ps.executeQuery();
        while(rs.next()){
    %>  
<tr>
<div class="accordion">
    <button type="button" class="accordion__button">button
        <td> d1 </td>
        <td> d2 </td>
        <td> d3 </td>
    </button>
    <div class="accordion__content">
       <p>
          lorem lorem lorem  
          lorem lorem lorem  
      </p>
   </div>
</div>
</tr>
                  
<%
        }
    }catch(Exception ex)
    {
        ex.printStackTrace();
    }
    finally {
        Databasebean.closeAll(conn3, rs3, ps3, null);
    }   
%>
</tbody>    
</table>

output: enter image description here

Thanks

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!