The following are simple steps to show how you can hooks your SharePoint page with JavaScript Client Object Model:
- From the Site Actions menu, choose New Page. Name the new page JSClientObjectModelTest.
- From the Page tab in the ribbon, click Save.
- Also from the Page tab, click the arrow under the Edit button and select Edit In SharePoint Designer.
- In SharePoint Designer, from the Home tab on the ribbon, select Advanced Mode.
- In the Content control with the ID PlaceHolderAdditionalPageHead, add the following markup after the SharePoint:RssLink tag (on one line):
<SharePoint:ScriptLink runat="server" Name="sp.js" Localizable="false" LoadAfterUI="true"/>
- Scroll to the bottom of the page, and before the WebPartPage:WebPartZone tag, add the following markup (on one line): <script type="text/javascript" src="../SilverlightControls/JScriptTest.js" ></script>
<div id="DemoConsole"></div> - Click the Save icon in the upper-left corner of the window to save the changes to SharePoint. Click Yes in the Site Definition Page Warning.
For more information on Silverlight and JavaScript Client Object Model, see below:
No comments:
Post a Comment