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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:31:01+00:00 2026-06-06T05:31:01+00:00

I want to be able to click the button and have it copy this:

  • 0

I want to be able to click the button and have it copy this:

<tr id="1">
<td>
    <input type="number" class="cue">
</td>
<td>
    <input type="time">
</td>
<td>
    <input type="text">
</td>
</tr>

And be able to change the id of the <tr> based on what is before it. I also want it to change the value of the number box based on the variable cueset.

When you press the button to add a row it calls add_row()

function add_row(rowCount)
   {
    for(i=0; i<rowCount; i++)
    {
        index = index + 1;
        $('table').append( $('#1').prop('id', index));
    }
   }

What im not sure how to do is have it change the id, or the value of the number box.

  • 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-06T05:31:03+00:00Added an answer on June 6, 2026 at 5:31 am

    I don’t understand the use of rowCount and the for loop from your explanation, so here it is without them

    function add_row()
    {               
        var mostRecentTr = [].pop.call($("tr"));                
        var newNum = 1+$(mostRecentTr).attr("id");      
        var newTr = $(mostRecentTr).clone().attr("id", newNum);             
        newTr.find(".cue").val(newNum);                 
        $("table").append(newTr);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to be able to click a button, have a function in my
I want to be able to click a button and open a new form
I want to add a click able button to a MKAnnotation as seen in
My exe processes text documents and I want to be able to right click
I'm developing a Cocoa application and want to be able to click a button
I want the user to be able to click a button and move to
want to click a button through javascript for testing purpose. i am able to
I want to simply be able to click a button and execute some ExtJS
I have a button: <button id=a onclick=Foo()>Button A</button> When I click this button the
At every button click I want to be able to make visible 4 textboxes

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.