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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:29:29+00:00 2026-06-06T18:29:29+00:00

in the following script I clone a new row form tfoot and append it

  • 0

in the following script I clone a new row form tfoot and append it to table tbody

<script>
$('#checklist-builder .add-row').click(function(){
    var new_row = $('#checklist-builder>tfoot>tr').clone();
    $('#checklist-builder>tbody').append(new_row);
});
</script>

cloned row is:

<tr>
  <td>${j}</td>
  <td>
    <input size="2" type="hidden" value="" name="WhoChecklistField[1][${j}][id]" id="WhoChecklistField_1_${j}_id">      <input size="2" maxlength="2" type="text" value="" name="WhoChecklistField[1][${j}][weight]" id="WhoChecklistField_1_${j}_weight">    </td>
  <td>
    <input type="text" value="" name="WhoChecklistField[1][${j}][name]" id="WhoChecklistField_1_${j}_name">    </td>
  <td>
    <select size="1" name="WhoChecklistField[1][${j}][type]" id="WhoChecklistField_1_${j}_type">
      <option value="text">Text field</option>
      <option value="select">Select field</option>
      <option value="radio">Radio field</option>
      <option value="checkbox">Checkbox field</option>
    </select>
  </td>
</tr>

now I want replace ${j} with table size + 1, how can I replace ${j} in jquery cloned string?

  • 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-06T18:29:30+00:00Added an answer on June 6, 2026 at 6:29 pm
    new_row.html(function(i, oldHTML) {
        return oldHTML.replace(/\${j}/g, 'table_size');
    });
    

    DEMO

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

Sidebar

Related Questions

I am using the following script to clone a div with form elements inside;
I have the following script: ALTER TABLE ODANBIRM ADD (OBID NUMBER(10, 0) ); ----------------------------------------------------------------------------
The following script: cls function test_me([string]$testVar, $my_array) { Write-Host $testVar } $test_array = a,b
I have a powershell script in which I do the following $somePSObjectHashtables = New-Object
i have the following script: posting(); pause(time); postSent(postUrl, fields); function postSent(postUrl, fields) { $.ajax(
I have a page, test.php, with the following code: <html> <body> <form> <script type=text/javascript>
I have the following table: <table width=1000 border=1 cellpadding=2 cellspacing=2 bordercolor=#CCCCCC class=WebApps id=addIssue> <tbody>
I have the following jquery code in my view <script type=text/javascript> $(document).ready(function () {
Following Script isn't working in CHROME browser, IE is Fine. I've changed opener.document ...
The following script was recommended to use a List Page to show a Google

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.