Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Im trying to create Items via ECMA Script & the client sided object model (CSOM).

Unfortunately I couldnt find an answer yet, can you tell me how to create it? I want to translate this function to the CSOM world :

 function Create_Hyperlink(address, description, comment) {
    var URL = address + " , " + description;
    $().SPServices({
        operation: "UpdateListItems",
        listName: "Hyperlinks",
        batchCmd: "New",
        valuepairs: [["URL", URL], ["Comment", comment]],
            completefunc: function (xData, Status) {
            alert("Created");
            }
    });
 }

Thanks for your replies :))

share|improve this question
    
just a remark... I would try to avoid the dollar-sign in your js since some sharepoint js-files use this... You can just replace your "$" with "jQuery" and it'll work also –  Ruben Herman Aug 2 '12 at 11:50

1 Answer 1

Learn to Google, my friend. The skill will serve you well. First hit on a search for "create list item javascript client object model" was:

How to: Create, Update, and Delete List Items Using JavaScript

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.