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

  • Home
  • SEARCH
  • 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 7247945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:04:23+00:00 2026-05-28T22:04:23+00:00

I have a problem retrieving all the data inside the rows added by the

  • 0

I have a problem retrieving all the data inside the rows added by the user. I tried using my variable reclist to retrieve the records but it give me blanks.

The source code is as follows:

<script type="text/javascript">
$(document).ready(function(){
   $('#btnAdd').live('click',function(){
      var name = $('#txtName').val();
      var name2 = $('#txtName2').val();
      $("#tbNames tr:last").after("<tr><td>" + name + "</td><td>" + name2 + "</td><td><img src='delete.gif' class='delete' height='15' /></td></tr>");
  });

   $('#tbNames td img.delete').live('click',function(){
        $(this).parent().parent().remove(); 
   });
 });
</script>

<input id="txtName" type="text" />
<input id="txtName2" type="text" />
<input id="btnAdd" type="button" value="Add" />
   <table id="tbNames" >
      <tr>
         <td><b>Name</b></td>
         <td><b>Name2</b></td>
         <td><b>Delete</b></td>
      </tr>
      <tr>
          <td>Bingo</td>
          <td>Tingo</td>
          <td><img src="Delete.gif" height="15" class="delete" /></td>
      </tr>
   </table>

<script type="text/javascript">
$(document).ready(function() {
    $("#submit_app").button();
    $("#submit_app").click(function() {
    var reclist = $("#txtName").val();
    console.log(reclist);
    });
});
</script>

<input id="submit_app" type="button" style="height: 35px; width: 225px" value="Add New User" />

Please advise if I have miss any coding.

  • 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-28T22:04:24+00:00Added an answer on May 28, 2026 at 10:04 pm

    Try following code. Check this demo on jsFiddle.net. This will give you all the values inside td of your table.

    $(document).ready(function() {
      $('#btnAdd').live('click', function() {
        var name = $('#txtName').val();
        var name2 = $('#txtName2').val();
        $("#tbNames tr:last").after("<tr><td>" + name + "</td><td>" + name2 + "</td><td><img src='delete.gif' class='delete' height='15' /></td></tr>");
      });
    
      $('#tbNames td img.delete').live('click', function() {
        $(this).parent().parent().remove();
      });
    
      //$("#submit_app").button(); //Commented this line
      $("#submit_app").click(function() {
          var skipFirstRow = 0; //Skip first row
          $("#tbNames tr").each(function() {
              if (skipFirstRow++ == 0) return;
              var skipLastColumn = 0;
              $(this).children("td").each(function() {
                  if (skipLastColumn++ == 2) return;
                  alert($(this).html());
              });
         });
         var reclist = $("#txtName").val();
         console.log(reclist);
      });
    });
    

    EDIT

    Check this fiddle. In this you will get the values in two arrays.

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

Sidebar

Related Questions

I have a problem that whenever I'm inserting data using coredata, everything's going fine.
Possible Duplicate: Problem in datareader retrieving data I have Memberships and Bookings tables in
We have a problem with the Euro character when saving and retrieving it from
I have problem with return statment >.< I want to store all magazine names
I have problem when I try insert some data to Informix TEXT column via
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
i have problem with autorotate on iphone i set up in all classes -
I'm having a problem retrieving a XMLList and I don't understand why. I have
I have an application that is retrieving data from Facebook. Users authorize the application
I have a problem with DataTable stored in Session and code execution when retrieving

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.