You can use the SharePoint client object model to retrieve, update and manage data in SharePoint 2013. SharePoint makes the object model available in several forms.
This article shows how to do basic operations using the JavaScript object model. You can add a reference to the object model using HTML <script> tags.The following sections describe tasks that you can complete programmatically and they include JavaScript code examples that show the operations.To create files, you use a FileCreationInformation object, set the URL attribute and append content as a base64 encoded array of bytes, as shown in this example.Procedure
Open your SP Site in SharePoint 2013 Designer, then select Site Assets icon in the designer ribbon and add a JavaScript file.Figure 1: Add a JavaScript FileAfter adding a JavaScript file, this file will be available in the SharePoint Site Assets Folder.Figure 2: Site Assets FolderGo to the SP site Page and add a new page to the SharePoint site.Figure 3: SP Site Figure 4: Add a New PageAfter adding a page select an Insert button in the Ribbon Menu.Figure 5: Ribbon MenuThen add a Content Editor Web part into the page.Figure 6: Content EditorEdit the WebPart and add a JavaScript file link to the content link .Figure 7: Web PartSave the web part and save the page in the site. Click the button!Figure 8: Save the web PartFigure 9: list updated succesfullyList updated successfully.Source Code
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: