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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:50:38+00:00 2026-05-18T06:50:38+00:00

I want to dynamically add rows to the table, what I achieve by cloning

  • 0

I want to dynamically add rows to the table, what I achieve by cloning the row and changing its id:


var cloned = $('#tempRow').clone().attr("id","tr" + trLastId);

Then I want to change the ids of other components in the row, e.g.:


cloned.find('input[id^="upload"]').attr("id","upload" + trLastId);

The problem arises when I want to change the id of the form, which is the first child of the row and contains all the other components:


cloned.find("form").attr('id', "dynamicForm"+trLastId);

All the lines above work fine in Firefox but the last line does not work in IE8. The clone is not inserted yet(before inserting it I need to change all the ids), just saved into ‘cloned’ variable. Why IE doesn’t allow me to change the id of cloned form? How can I overcome it? I’m using jquery 1.3.2.

  • 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-05-18T06:50:39+00:00Added an answer on May 18, 2026 at 6:50 am

    Your description suggests that your HTML is not 100% valid, something like <tr><form>...</form></tr> or <tr><td><form></td>...<td></form></td></tr>. JavaScript needs to work in a valid DOM tree so when the browser finds invalid HTML it tries to alter the structure to make it valid. That means that the actual document jQuery is working on may be different from the one you have in mind; it may even vary across browsers.

    Can you confirm whether your HTML validates at http://validator.w3.org/ or any other similar service?

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

Sidebar

Related Questions

I want to add rows to a table dynamically inside a for loop. User
i want to dynamically add a class to all rows of a table except
I have a table in which i add rows dynamically and i want to
I have a gridview which is databound, I want to dynamically add a row
I'm using jQuery to dynamically add rows to my HTML table on a button
I have a table to which i dynamically add rows. The number of days
I'm making some code to dynamically add more rows to a table on click.
i am having dynamically created UITableView . I want to add 3 dummy row
I have a gridview and I want to add rows in it dynamically. I
I want to dynamically add some columns (and remove others) from an html table.

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.