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

New Post: Reload GetListItems on Form Change

$
0
0
  • What type of element is #Querycontent?
  • Are you trying to replace all of the content of the #Querycontent with new stuff? or append more values to it?
Given that you are trying to append bullet list items (<li>) I assume it is a order/unordered element (<ol> or an <ul>)... If not, then you are output invalid markup...

Try this:

Replace the entire content (I'm assuming #Querycontent is a <ul> or <ol>):
var $Querycontent   = $("#Querycontent");
var liHtml          = "";

// Build all new values
$(xData.responseXML).SPFilterNode("z:row").each(function() {
    var DocNo = ($(this).attr("ows_DocumentNo"));
    var href = ($(this).attr("ows_View_x0020_Item")).split(",")[0];
    liHtml += "<li><a href='"+ href +"' target='_blank'>" + DocNo + "</a></li>"; 
});


// CLear all existing values and Append new values to the List
$Querycontent.empty().append(liHtml);
/Paul.

Viewing all articles
Browse latest Browse all 6517

Trending Articles



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