2

Is it possible to add a webpart to a page using Javascript. I want to add a webpart to a specific page whenever a button is clicked.

  • Can you put some more specification about what you need? – Hardik May 25 '16 at 13:12
3

Here are the steps you should execute

  1. Get the XML for webpart
  2. Load Limited Webpart Manager object
  3. Add web part.

You can find details on https://msdn.microsoft.com/en-us/library/office/hh185010(v=office.14).aspx#sectionSection1

Add an existing WebPart Using the Sharepoint client object Model

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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