Write to a SharePoint list from an html page that is not located within the SharePoint site -
i have website not located within sharepoint site. want collect user data website , save in sharepoint list. possible?
you can perform list operations including add, update, , delete using built-in sharepoint rest api.
microsoft provides pretty documentation using rest api.
note: api endpoints , features noticeably different sharepoint 2010 , 2013.
there many variations use rest api. here snippet of sample rest call might add item existing list using javascript:
function addlistitem() { var mylisturl= "mysite.sharepoint.com/_vti_bin/listdata.svc/mylist"; var item= {}; item.title = "adding item using 2010 rest api"; var itementry= json.stringify(item); $.ajax({ type: "post", url: mylisturl, data: itementry, contenttype: "application/json; charset=utf-8", success: function () { //do stuff here }, error: function() { //do error handling here } }); }
Comments
Post a Comment