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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:35:33+00:00 2026-06-17T21:35:33+00:00

I need to go through a few <tr> s (I don’t know the exact

  • 0

I need to go through a few <tr>s (I don’t know the exact number beforehand since they are generated on the fly), where I have a few dropdowns. The names of dropdowns are set as item_size[], item_set[] and item_quantity[]. I need to get their value onsubmit.

I understand that I need to use each function here, like $('tr.item').each(function(){ to go through them and then need to find a way to get values chosen in each of the three dropdowns.

Any idea here ?
Thanks.

<tr class="item">
    <td>some stuff</td>
    <td><select name = "item_size[]" ...><option>...</option><option>...</option></select></td>
    <td><select name = "item_set[]" ...><option>...</option><option>...</option></select></td>
    <td>some stuff</td>
    <td><select name = "item_quantity[]" ...><option>...</option><option>...</option></select></td>
    <td>some stuff</td>
</tr>
<tr class="item">
    <td>some stuff</td>
    <td><select name = "item_size[]" ...><option>...</option><option>...</option></select></td>
    <td><select name = "item_set[]" ...><option>...</option><option>...</option></select></td>
    <td>some stuff</td>
    <td><select name = "item_quantity[]" ...><option>...</option><option>...</option></select></td>
    <td>some stuff</td>
</tr>
<tr class="item">
    <td>some stuff</td>
    <td><select name = "item_size[]" ...><option>...</option><option>...</option></select></td>
    <td><select name = "item_set[]" ...><option>...</option><option>...</option></select></td>
    <td>some stuff</td>
    <td><select name = "item_quantity[]" ...><option>...</option><option>...</option></select></td>
    <td>some stuff</td>
</tr>
  • 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-17T21:35:35+00:00Added an answer on June 17, 2026 at 9:35 pm
    var inputs = new Array();
    $("tr.item").each(function() {
        var tr_inputs = new Array();
        $(this).find("select").each(function() {
            tr_inputs[$(this).attr("name")] = $(this).val();
        });
        inputs.push(tr_inputs);
    });
    console.log(inputs);
    

    You can retrieve the values for each item from the array inputs. Each item consists of 3 key value pairs for item_size[], item_set[] and item_quantity[].

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using flex and have a few images that I need to sequence through.
I have a few simliar tables. I need to select them through * .
I need to access a few HTML pages through a Python script, problem is
I have a huge ammount of photos that need sorting through. I need to
I need to parse through a CMS generated HTML page and add list item
I have been on a few forum posts now reading through trying to figure
I need parse through a file and do some processing into it. The file
I need to parse through a string and add single quotes around each Guid
I need to loop through a List of Dictionaries List<Dictionary<string,string>> to populate a DataTable.
I need to iterate through all byte values (-128 to 127 inclusive). I could

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.