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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:27:51+00:00 2026-06-16T03:27:51+00:00

The HTML table below is generated in my PHP code and can have any

  • 0

The HTML table below is generated in my PHP code and can have any number of rows, up to circa 500 or more.

<table>
    <tr>
        <th>Name</th>
        <th>Working</th>    
        <th>Non-Working</th>    
        <th>Top Working Rate</th>
    </tr>
    <tr>
        <td>DX</td>
        <td><input type="text" name="items[4357][1]" value="1.00"></td>
        <td><input type="text" name="items[4357][2]" value="1.00"></td>
        <td>None</td>
    </tr>
    <tr>
        <td>Kindle</td>
        <td><input type="text" name="items[4358][1]" value="1.00"></td>
        <td><input type="text" name="items[4358][2]" value="1.00"></td>
        <td>None</td>
    </tr>
    <tr>
        <td>Kindle 2</td>
        <td><input type="text" name="items[4359][1]" value="1.00"></td>
        <td><input type="text" name="items[4359][2]" value="1.00"></td>
        <td>None</td>
    </tr>
    <tr>
        <td>Kindle 2 3G</td>
        <td><input type="text" name="items[4360][1]" value="1.00"></td>
        <td><input type="text" name="items[4360][2]" value="1.00"></td>
        <td>None</td>
    </tr>
    <tr>
        <td>Kindle 3 3G</td>
        <td><input type="text" name="items[4361][1]" value="1.00"></td>
        <td><input type="text" name="items[4361][2]" value="1.00"></td>
        <td>None</td>
    </tr>
    <tr>
        <td>Kindle Fire</td>
        <td><input type="text" name="items[4362][1]" value="1.00"></td>
        <td><input type="text" name="items[4362][2]" value="1.00"></td>
        <td>60.00</td>
    </tr>
    <tr><td><input type="submit" value="Save Rates"></td></tr>
</table>

By clicking on a link or button, I want to copy the values in the 4th column to input values in the 2nd. If the value is “None”, the row shouldn’t be copied. Preferably, the solution will enable me to pass as parameters the columns to copy from/to but I can adapt if necessary.

Obviously, when working with larger tables, the code could get slow, but some delay is expected by the end-users.

  • 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-16T03:27:52+00:00Added an answer on June 16, 2026 at 3:27 am

    You could try this:

    $('input[type=submit]').on('click', function(e) {
        e.preventDefault();
        $('tr').each(function() {
            var $this = $(this),
                prc = $this.find('td').eq('3').html();
            if (prc !== 'None') {
                $this.find('td').eq('1').find('input').val(prc);
            }
        });
    });​
    

    FiddleSticks

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

Sidebar

Related Questions

I have HTML Like Below. I have a table inside another table.Each TD in
I have just begun Rails 3. I have generated the below code using the
I have some HTML shown below, which is generated dynamically in an ASP Classic
I have a html table that is generated by looping through DB entries. On
I have a html table with a variable number of cells. For the sake
Here is HTML markup of 2 rows from my huge table (which generated by
Given the following html table and script shown below I am having a problem
I m new with jquery.Below is my html table which is in content page.In
I want to add Excel button below the html table, that gives an Excel
Below is my HTML : <table width=100% > <tr> <td> <asp:TextBox ID=tbNewNote TextMode=MultiLine runat=server

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.