Click here to Skip to main content
15,885,956 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using the below code to insert an item into the list.

JavaScript
function createitem() {
     var selectListBox = document.getElementById("txtFormName");
     var selectedListTitle = selectListBox.value;
     var selectedList = web.get_lists().getByTitle(selectedListTitle);

     var listItemCreationInfo = new SP.ListItemCreationInformation();
     var newItem = selectedList.addItem(listItemCreationInfo);

     newItem.set_item('Title','abc');
     newItem.update();
     context.load(newItem);
     context.executeQueryAsync(onItemCreationSuccess, onItemCreationFail);
     }

Its working fine. Now I want to use
JavaScript
newItem.set_item('Title','abc')
in loop for more than one item in the same row to insert. How can i achieve that. kindly guide.
Posted
Comments
Pradip R 27-Nov-14 2:17am    
Can you elaborate more, I am not getting your question. What do you want exactly?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900