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 8606829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:11:29+00:00 2026-06-12T03:11:29+00:00

I have a controller setup and the view contains a table with some information.

  • 0

I have a controller setup and the view contains a table with some information. When the submit button is pressed on the jsp page, I would like to get the information from the 2nd column in the table so that I can process that information in the controller. The rows in the table can vary from 2 to 100, so I was looking for something that would get the value from the 2nd column irrespective of the number of rows. I want to extract the information from td class urltext. I did my research but I was not able to find any information related to this so any ideas would be highly appreciated. Thanks.

<table name="urlTable" id="urlList"  style="width:100%; overflow: scroll;">
<tr>
    <th>Select</th>
    <th>URL</th>
</tr>
<c:forEach var="urlList" items="${command.urlList}">
<tr>
    <td><input type="checkbox" name="chk"/></td>
    <td class="urlText"><input class="urlValue" type="text" value="${urlList}" style="font-size: 13px; border: none;" size="85px;" readonly="readonly"/></td>
</tr>
</c:forEach>
</table>                                
  • 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-12T03:11:30+00:00Added an answer on June 12, 2026 at 3:11 am

    Let’s start by using thead and tbody elements as we ought.

    <table name="urlTable" id="urlList"  style="width:100%; overflow: scroll;">
    
        <thead>
            <tr>
                <th>Select</th>
                <th>URL</th>
            </tr>
        </thead>
        <tbody>
            <c:forEach var="urlList" items="${command.urlList}">
            <tr>
                <td><input type="checkbox" name="chk"/></td>
                <td class="urlText"><input class="urlValue" type="text" value="${urlList}" style="font-size: 13px; border: none;" size="85px;" readonly="readonly"/></td>
            </tr>
            </c:forEach>
        </tbody>
    
    </table> 
    

    Then just target the second column of each row in the tbody. I assume you’re targeting the input.

    var inputs = $("#urlList > tbody > tr > td:nth-child(2) > input");
    

    I don’t know what you want to do with the input at this point. If you want an Array of the values, do this.

    var vals = inputs.map(function() { 
                             return this.value; 
                          }).toArray();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Following setup causes trouble: In my storyboard I have a standard table view controller,
I have an app that I just got setup with a split view controller
I have a view controller which contains a scroll view. Inside the scroll view
Hey all... I have a view controller (A) which on some action, alloc init's
I have a UIScrollView which contains a view controller which contains a couple of
My CodeIgniter website's controller is set up like this: $this->load->view('head', $data); // Contains <head>
I have a view controller which contains a field for user to enter date
I have a view setup in Interface Builder which contains a viewController that loads
I have a controller setup to accept two vars: /clients/view/var1/var2 And I want to
In my controller I have model operations that can return empty results. I've setup

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.