Function: $().SPServices
Web Service: Lists
Operation : UpdateListItems
$(document).ready(function() {
$("#fdbsubmit").click(function(){
var subject = $("#fdbsubject").val();
var message = $("#fdbmessage").val();
CreateNewItem(subject, message);
});
});
function CreateNewItem(subject, message)
{
$().SPServices({
operation: "UpdateListItems",
async: false,
batchCmd: "New",
listName: "feedback",
valuepairs: [["Title", subject], ["Message", message]],
completefunc: function(xData, Status)
{
alert("insertion completed");
}
});
}
No comments:
Post a Comment