Home
> Content Editor Webpart, SharePoint 2010 > How to use html and JavaScript in Content Editor web part in SharePoint2010
How to use html and JavaScript in Content Editor web part in SharePoint2010
Here are the steps you need to take to use html and JavaScript in content editor web part.
1. Edit a site page and add a content editor web part on the page.
2. After the content editor is added to the page, it will display on the page like shown below
3. Next, upload your html and JavaScript content as a text file to a document library inside your SharePoint site.
Here is the content in the document
<script type="text/javascript"> alert("Hello World"); </script>
4. Edit the content editor web part and reference the file you just uploaded.
5. Save the page and you will see the hello world prompt.
References:
http://stackoverflow.com/questions/5020573/sharepoint-2010-content-editor-web-part-duplicating-entries
http://sharepointadam.com/2010/08/31/insert-javascript-into-a-content-editor-web-part-cewp/
Comments (0)
Trackbacks (2)
Leave a comment
Trackback
-
January 19, 2013 at 10:25 amHow to create a link to Nintex Start Workflow Page in the document set home page « YBBEST SharePoint Pie
-
January 3, 2015 at 11:11 pmWeb Html Editor Javascript | Technology Documents