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

The Archive Base Latest Questions

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

The first snippet of my codes, which is in the file named sys_Param.aspx: <div

  • 0

The first snippet of my codes, which is in the file named sys_Param.aspx:

<div id="div_water" style="display: none" align="center">  
<table width="100%" border="0" id="printTbl" align="center" cellpadding="5" cellspacing="1" class="table">
    <tr class="TR_BG_list" id="printsizescroll" style="display:none">
        <td align="right" class="list_link" style="width: 214px">
        Resize the pictrue:
        </td>
        <td align="left" class="list_link">
            Description:
        <asp:TextBox ID="PrintSizeDec" runat="server" CssClass="form"  style="width: 106px"/>
         width|height:
        <asp:TextBox ID="PrintSmallSize" runat="server" CssClass="form"  style="width: 50px"/>
&nbsp;
        <label>
             <input type="button" name="PintSizeAddClick" value="Add" class="form" id="ButtonAdd" style="width: 44px" onclick="createInputTexts(this)" />
        </label>
       <span class="helpstyle" style="cursor: help;" title="Click to get some help" onclick="Help('H_WaterParam_0008',this)">Help</span>
    </td>
    </tr>
    <tr class="TR_BG_list">
<td align="center" colspan="2" class="list_link">
    <label>
    <input type="submit" name="Savewater" value=" Submit " class="form" id="Savewater" runat="server" onserverclick="Savewater_ServerClick" />
    </label>
&nbsp;&nbsp;
        <label>
    <input type="reset" name="Clearwater" value=" Reset " class="form" id="Clearwater" runat="server" />
    </label>
</td>
</tr>
</table>

Another part: the event handler :

function createInputTexts() {

    var trOrigin = $("#printsizescroll");
    var trClone = trOrigin.clone(true);
    var target = $("#printTbl tr:last-child").prev();

    trClone.find(":button").val("delete");
    $('#printTbl').on('click', 'input[type="button"][value="delete"]', function () {
        $(this).parent().parent().parent().remove();
    });   
    trClone.css('display', '');
    // Here you can also set new ID.
    target.after(trClone);
}

The question is: when I click the delete button,it doesn’t delete the new clone row which was created by jQuery dynamicly.I was so confused,cause I have bind the click event to every delete button.
I need some help, thanks a millious.

  • 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-06T09:17:14+00:00Added an answer on June 6, 2026 at 9:17 am

    Take a look if this is the effect you want: http://jsfiddle.net/qV4jG/16/

    The cloned buttons still have the onclick attribute, so I removed them before binding a click event as seen in this part:

      trClone.addClass("deleteBtn"+i).find(":button").val("delete").removeAttr('onclick').click(function() {
          $(this).parent().parent().parent().remove();
      });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose, I have a js file which looks like this: $(document).ready(function() { // first
So, here's my question: Why won't the code in the first snippet work when
In the following code snippet, if I go to the first open parenthesis (
This code snippet is from C# in Depth static bool AreReferencesEqual<T>(T first, T second)
I've got this code snippet, and I'm wondering why the results of the first
I first implemented the following snippet to show a hi alert and do a
We all may know the following snippet that gets the first entry of the
First some background. We have a vendor application which generates logs and configuration files
I am importing a csv file which has a lot of invoice data. This
I'm using the following snippet of code to attempt to copy a file from

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.