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 a table which looks like Col1 col2 col3 col4 col5 1 5
I have some PHP code which allows me to sort a column into ascending
I have a datatable that looks like the following public static DataTable SetColumnHeaders(DataTable KeyDataTable)
I am appending new data - $('#posts').append(data); But I want this new data to
Lets say that I would like to construct a list (L2) by appending elements
I have a NSTableView with 3 columns. I can sort using any of the
I have a table containing a large number of rows. Each row has 2
I am trying a different kind of sorting in Oracle.Its like I have three
hi i have a datagridview in a form... users by clicking the column name
I have two tables [Source: table1, Destination:table2] with 3 columns each (checkbox, value1, value2).

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.