Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7739509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:32:30+00:00 2026-06-01T08:32:30+00:00

I have this kind of table, it has many rows and each row has

  • 0

I have this kind of table, it has many rows and each row has two columns, first column has a text and second column has list of checkboxes for each row. I was able to retrieve the values of fist column but not the values of selected checkboxes for each colunm.

I have used var cellval=Table.rows[i].cells[0].firstChild.data in a “for” loop in the Java Script to get the first column values, but how can I get the selected checkbox values for each row inside this for loop? (I need to map for each 1st cell value what are the selected checkbox values in the 2nd cell)

<tbody>
            <% List data = (List) request.getAttribute("fiboterm");%>
<%int i=0;%>
        <c:forEach var="row" items="${PhraseScoreList}">
            <tr>
                <td width="75%">${row.phraseContent}</td>
                <td width="25%">
                    <div style="overflow: auto; width: 200px; height: 75px; border: 1px solid #336699; padding-left: 5px">
                       <%Iterator itr;%>
                        <% 
                        for( int j=0;j<data.size(); j++){
                        %>
                        <input type="checkbox" name="nums<%=i%>" id="chk[<%=i%>]" value="<%=data.get(j)%>"> <%=data.get(j)%><br>
                        <%}
                       i++;
%>
                    </div>
                </td>
            </tr>
        </c:forEach>
        </tbody>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T08:32:32+00:00Added an answer on June 1, 2026 at 8:32 am

    you are mixing code and html.

    1)consider using serlvlet and jsp and a dao. i.e simple MVC architecture.
    get checkbox values from the Servlet in a loop using this kind of statement

    String[] checkboxval = request.getParameterValues("nums" + i);
    

    2) otherwise i suggest you try this out by using jquery library;

    $(document).ready(function() {
                    $("input[name=first column value").change(function() {
                        $(this).closest("tr").find("input[name^=name of value to be input]").attr("disabled", !this.checked);
                    });
                });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table in the db called task. This table has many other
guys i have arrays in which i have to match this kind of text
I know this kind of questions have been asked already many times before. The
I have a product table that has a many-to-many relation to itself (using a
I know this kind questions has been posted here many times, for exmaple: Java
I'm using two tables for my current project(it will grow certainly). First table has
I have a many to many table that has become a bit of a
I have a table, let's call it My_Table that has a Created datetime column
I have a table that has 8 million records, with many fields, including lat/long
I have this kind of question. In my form, i got this as a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.