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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:36:38+00:00 2026-06-01T00:36:38+00:00

<html><head> <link type=text/css rel=stylesheet href=file:///C:/Users/Documents/style.css /> <script type=text/javascript src=file:///C:/Users/Documents/jquery-1.7.1.js></script> <script type=text/javascript src=file:///C:/Users/Documents/jquery.tablesorter.js></script> <script type=text/javascript>

  • 0
<html><head>
<link type="text/css" rel="stylesheet" href="file:///C:/Users/Documents/style.css" />
<script type="text/javascript" src="file:///C:/Users/Documents/jquery-1.7.1.js"></script>
<script type="text/javascript" src="file:///C:/Users/Documents/jquery.tablesorter.js"></script>

<script type="text/javascript">
$(document).ready(function() {
    load();
});

var map1 = { "iDate":"test_value1", "iName":"test_value2" , "iFile":"test_value3" }; 
var map2 = { "iDate":"nexttest_value1", "iName":"nexttest_value2", "iFile":"nexttest_value3" }; 

var list = new Array( map1, map2 );
list[0] = map1;
list[1] = map2;

function load() {
   var beginTD = $( "<td><div class='scroll-pane horizontal-only' style='vertical-align: top'>" );
    var endTD = $( "</div></td>" );

jQuery.each( list, function( index, map ) {
$( "#hpTable > tbody:last" ).append( $( "<tr>" ) );
    jQuery.each( map, function( key, value ) {
        var pTag = $( "<p id='" + key + "'>" + value + "</p>" ); 
            $( "#hpTable td:last" ).append( beginTD, pTag, endTD );
        });
    $( "#hpTable" ).append( $( "</tr>" ) );
    });
};
</script>
</head>
<body>
<br>
<table id="hpTable" cellpadding="5" width="100%" style="table-layout:fixed" class="tablesorter">
<thead><tr>
    <th width="9%">Date</th>
    <th width="9%">Name</th>
    <th>File</th>
</tr>
</thead>
<tbody></tbody>
</table>
</body
</html>

Hello everyone! Thanks for reviewing my second post. I’m a jquery newbie and looking for figure out why I can’t build a row and cell dynamically? Any help is appreciated!

  • 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-01T00:36:39+00:00Added an answer on June 1, 2026 at 12:36 am

    As said Frédéric Hamidi, you don’t open and close tag in jQuery, you simply add a tag inside another, and use it as simple variable to do some stuff with it.

    Then your “each” parsing should look like this :

    jQuery.each( list, function( index, map ) {
        // you create a tr tag and attached it to your table body
        var trTag = $( "<tr></tr>" ).appendTo($( "#hpTable > tbody"));
        jQuery.each( map, function( key, value ) {
                var tdTag = $('<td/>').appendTo(trTag);
                var divTag = $("<div class='scroll-pane horizontal-only' style='vertical-align: top'/>").appendTo(tdTag);
                var pTag = $( "<p id='" + key + "'>" + value + "</p>" ).appendTo(divTag);
            });
        });
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a html like this: <html> <head> <link rel=stylesheet type=text/css media=all href=style.css> </head>
I have the following file: <html> <head> <title></title> <link rel=css type=text/css href=/empty.css title=css />
I have a list like this: <html> <head> <link type=text/css rel=stylesheet href=testli.css> </head> <body>
<?php include('db_connect.php'); ?><head> <link rel=stylesheet type=text/css href=comment-style.css media=screen /> <script type=text/javascript src=../jquery.tablesorter/jquery-latest.js></script> <script type=text/javascript
Here is the html: <html> <head> <meta http-equiv=Content-Type content=text/html; charset=UTF-8/> <link rel=stylesheet type=text/css href=styles.css/>
<!DOCTYPE html> <html> <head> <meta charset=utf-8 /> <title>Remote Control</title> </head> <link rel=stylesheet href=/../.. type=text/css
<html> <link rel=stylesheet type=text/css media=screen href=blogstyle.css> <title>Welcome to my blog</title> <body> <frameset cols=10%,60%,30% border=0
Consider the following markup: <!DOCTYPE html> <html> <head> <title>Test Page</title> <link href=screen.css rel=stylesheet />
I have the following file file: <html> <head> <title></title> <script type=text/javascript src=/Prototype.js></script> <script type=text/javascript>
HTML: <html> <head> <meta http-equiv=Content-Type content=text/html; charset=UTF-8> <title></title> <link type=text/css href=galerina.css rel=stylesheet/> </head> <body>

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.