jQuery UI Widgets Forums Lists ListBox Get items ID from a list from sharepoint Online

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 10 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • sinan
    Participant

    I want get help with getting ID from sharepoint online list when i select a item from a listbox.
    This is my code:

    $(“#Box2”).jqxListBox({
    source: [],
    theme: ‘energyblue’,
    width: ‘300px’,
    height: ‘250px’,
    });

    $(“#jqxButton”).jqxButton({
    theme: ‘energyblue’
    });
    $(‘#jqxButton’).on(‘click’, function () {

    var items = $(“#Box2”).jqxListBox(‘getSelectedItems’);
    if (items.length > 0) {
    list = Semesterlist.getItems(“”);
    clientContext.load(list)
    clientContext.executeQueryAsync(OnSeccess, OnFail)

    function OnSeccess() {
    var enumerator = list.getEnumerator();
    while (enumerator.moveNext()) {
    var currentItem = enumerator.get_current();
    }
    alert(currentItem.get_item(“ID”));

    }
    function OnFail(sender, args) {
    alert(‘Error:’ + args.get_message());
    }
    }
    });


    Dimitar
    Participant

    Hello sinan,

    We do not have any experience with SharePoint and cannot assist you, unfortunately.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.