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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:11:19+00:00 2026-05-23T01:11:19+00:00

Hi I am appending columns to a row though jquery. I have a row

  • 0

Hi I am appending columns to a row though jquery.
I have a row which looks like this

<form action="certifications.php?action=addnew_save" method="post">
<tr id="add_new_<?php echo($v_id);?>" valign="top" bgcolor="#EEEEEE"></tr>
</form>

Now What I am doing, I am appending some <td> to this row. My javascript function looks like this

var sr=document.getElementById('hidden_'+vid).value;
var append='';
    append+='<td width="40" align="center">'+sr+'</td>';
    append+='<input type="hidden" value="'+vid+'">';
    append+='<td width="200" align="center"><input type="text" name="short_name" size="25" autocomplete="off" value="" /></td>';
    append+='<td width="200" align="center"><input type="text" name="full_name" size="25" autocomplete="off" value="" /></td>';
    append+='<td width="80" align="center"></td>';
    append+='<td width="80" align="center"><input type="checkbox" name="feature" /></td>';
    append+='<td width="80" align="center"><input type="text" name="order" size="2" value="" /></td>';
    append+='<td width="80" align="center"><input type="checkbox" name="hidden" /></td>';
    append+='<td width="80" align="center"></td>';
    append+='<td width="50" class="style3" align="center"></td>';
    append+='<td width="50" class="style3" align="center"><INPUT TYPE="submit"  VALUE="Submit" NAME="Submit"></td>';
    append+='<td width="50" class="style3" align="center"><a href="certifications.php?action=delete&id="onclick="if(confirm(\'Are you sure you want to Delete it ?\')){return true;}else{return false;}" >Delete</a></td>';
    append+='<td width="80" align="center"></td>';
    jQuery('#add_new_'+vid).append(append);

The columns are appended but the problem is of form tag. From my code I want the after appending the html should look like this

<form action="certifications.php?action=addnew_save" method="post">
<tr id="add_new_<?php echo($v_id);?>" valign="top" bgcolor="#EEEEEE">
 <td widht="40">Value</td>
 Other tds
  .
  .
  .
  .
</tr>
</form>

But I am getting the form tag above <tr> and it looks like this

   <form action="certifications.php?action=addnew_save" method="post">
   </form>
    <tr>
     my <td>
    </tr>

What is the problem in appending? Why form tag is always above

  • 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-23T01:11:20+00:00Added an answer on May 23, 2026 at 1:11 am

    Change

    jQuery('#add_new_'+vid).append(append);
    

    to

    jQuery('#add_new_'+vid).html(append);
    

    You don’t want to add your code after the element, but you are trying to insert it into the tr.

    UPDATE: Technically you should not be wrapping a <tr> with a <form>, its invalid HTML. A tr must be a child of a table, or tbody, and tr elements must have td as children. You’ll either need a form in each td, or you’ll need your form to wrap the entire table.

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

Sidebar

Related Questions

I have an Excel sheet that looks like this: |A B C D -----------------------------------------------------------------------------------
I have some PHP code which allows me to sort a column into ascending
Possible Duplicate: MySql Row Number? I'm using PHP 5 and mysqli. I have a
I have data that, in a normal query, would appear like this: Val1 Val2
I have a DataGridView control on my form. It has 6 columns and 6
I have an ASPxGridView with some columns. When I select a row and enter
I have a datatable that looks like the following public static DataTable SetColumnHeaders(DataTable KeyDataTable)
Trying to write a fourth column to a set of data which looks like
I have one asp.net grid view. This rows and columns are dynamically generating based
I have code like following: switch(sort.Column) { case code: model = (sort.Direction == SortDirection.Ascending)

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.