Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: Table rows not being rendered

$
0
0
Does anyone see why the rows aren't being created in the else statement? When the list name changes a new table is created and the first row is added properly but when it is looping through the items in the list the additional rows are not being created. FYI, I did debug this and it is going into the else statement and looping through the items but nothing gets rendered to the page. Code sample below.......

if(listName!=newListName)
{
newListName = listName;
liHtml = listName + "<br><table><tr><td>File Name</td><td>File Size</td><td>Last Modified</td></tr><tr><td width='200px'>" + $(this).attr("ows_FileLeafRef") + "</td><td>" + $(this).attr("ows_FileSizeDisplay") + "</td><td>" + $(this).attr("ows_Modified") + "</td></tr>";
}
else
{
liHtml = "<tr><td>" + $(this).attr("ows_FileLeafRef") + "</td><td>" + $(this).attr("ows_FileSizeDisplay") + "</td><td>" + $(this).attr("ows_Modified") + "</td></tr>";
}
$("#myDiv").append(liHtml);

Also, it would great if I could find out how to close off the table after it has looped through all the items in that list so a new table can be opened for the next list in the list collection.

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>