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

  • Home
  • SEARCH
  • 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 9139707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:25:22+00:00 2026-06-17T09:25:22+00:00

I need to get JSON of checked rows of following html table using jQuery

  • 0

I need to get JSON of checked rows of following html table using jQuery

JSON should contain the comments which user entered in textbox.
Any pointer will be helpful to me.

<table id="potable_grid" class="tab">
    <thead>
        <tr>
            <th>
                select PO
            </th>
            <th>
                po id
            </th>
            <th>
                ponumber
            </th>
            <th>
                pocurrency
            </th>
            <th>
                balance
            </th>
            <th>
                thisinvoice
            </th>
            <th>
                thisinvoiceinInvoicecurrency
            </th>
            <th>
                comments
            </th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>
                <input type="checkbox" id="chckPO" />
            </td>
            <td>
                po001
            </td>
            <td>
                cuspo1
            </td>
            <td>
                usd
            </td>
            <td>
                10000
            </td>
            <td>
                200
            </td>
            <td>
                2
            </td>
            <td>
                <input type="text" id="txtPO" />
            </td>
        </tr>
        <tr>
            <td>
                <input type="checkbox" id="chckPO" />
            </td>
            <td>
                po002
            </td>
            <td>
                pocus125
            </td>
            <td>
                inr
            </td>
            <td>
                5000
            </td>
            <td>
                300
            </td>
            <td>
                18000
            </td>
            <td>
                <input type="text" id="txtPO" />
            </td>
        </tr>
    </tbody>
</table>

I have checked many post like
HTML Table to JSON

but it working for simple html table in which rows doesnt have any control.

  • 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-17T09:25:22+00:00Added an answer on June 17, 2026 at 9:25 am
    var $checked = $('#potable_grid :checked');
    
    var data = [];
    
    for(var i = 0; i != $checked.length; ++i)
    {
      var $row = $($checked[i]).closest('tr');
      var text = $row.find(':text').val();
    
      data.push(text);
    }
    
    // data is now an array of all checked texts.
    

    Your question is vague, but this should get you started about how to iterate over the rows that are checked and to get the values you want.

    Having the same ‘id’ for all your textboxes is invalid, by the way. If you want to know the’ id’ associated with record in question, then do something like po id‘ e.g. <input type="text" id="cuspo1" />. Then your data (JSON) can be an object, e.g.

    var $input = $row.find(':text');
    
    data.push({ id: $input.attr('id'), value: $input.val() });
    
    
    // now data contains an array of { id, value };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to get json data and I'm using urllib2: request = urllib2.Request(url) request.add_header('Accept-Encoding',
I need to get a reference from JSON object, the code just following: var
I'm using AFNetworking and like it very much. I need to get JSON data
I need to get the regular title and regular body from this JSON feed.
Why do I need the json jersey dependencies on client side for service.path(rest).path(object).path(id).accept(MediaType.APPLICATION_JSON).get(ObjectDTO.class); but
I need to parse this json and get the itemvotecounts, and firstrankvotescounts. [ [
I need a little help with navigating a json file. I'm looking to get
I need get the id of an images which is place inside a datatemplate..
I have a json response coming and i need to get all the values
I need to get value from json. It works perfectly on returned objects, but

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.