Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Get list item with html content via javascript

$
0
0

Hi guys,

i want to get any items from a list via JS.One of this Item is of type note with Html . How can i get only the text value? i try .innerText but no way.

this is my code

function retrieveListItems(siteUrl) {
    var clientContext = new SP.ClientContext(siteUrl);
    var oList = clientContext.get_web().get_lists().getByTitle('Calendar');

    var camlQuery = new SP.CamlQuery();
    camlQuery.set_viewXml("<View><Query><Where><Eq><FieldRef Name='LinkTitleNoMenu' /><Value Type='Computed'>"+ QueryValue+"</Value></Eq></Where></Query></View>");
    this.collListItem = oList.getItems(camlQuery);

    clientContext.load(collListItem);
    clientContext.executeQueryAsync(
        Function.createDelegate(this, this.onQuerySucceeded),
        Function.createDelegate(this, this.onQueryFailed)
    );
}

function onQuerySucceeded(sender, args) {
    var listItemInfo = '';
    var listItemEnumerator = collListItem.getEnumerator();

    while (listItemEnumerator.moveNext()) {
        var oListItem = listItemEnumerator.get_current();

            var Title = oListItem.get_item('Title') ;
           var Location = oListItem.get_item('Location');
           var Agenda = oListItem.get_item('Agenda').innerText;


    }

Thnax


Viewing all articles
Browse latest Browse all 7589

Trending Articles



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