Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Custom Content Editor Web Part with JavaScript

  Asked By: Leslie    Date: Jul 08    Category: Sharepoint    Views: 3219

Out of the box, you can place a content editor web part on a page and add
javascript to it. When the page is loaded, the javascript will run.

I want to create a custom web part that contains and runs javascript. This way,
I won't have to cut/paste the javascript code multiple times.

Can this be done?

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Perla Vang     Answered On: Jul 08

I'm not sure I understand. Do you just want a way to edit Javascript in the
page, aside from the Source popup window?

 
Answer #2    Answered By: Sandra Alexander     Answered On: Jul 08

I need to create  a CEWP that contains a lot of javascript. I would like to
create and test it in a test environment and deploy it as a custom  web part  in a
production environment.

This CEWP web  part will also be used in many sites on the same server. I do not
want to duplicate the javascipt each time I want to use it - I just want to
place the "custom CEWP" where I want to use it.

 
Answer #3    Answered By: Nalin Rao     Answered On: Jul 08

Have you tried creating and configuring the CEWP and then exporting the
definition of the web  part? Then Import it to the web part  site collection
gallery on the production site.

 
Answer #4    Answered By: Thomas Davis     Answered On: Jul 08

Check and see if the custom  editor web  part is inhertitible or not. If it
is, it should be more than possible.

 
Didn't find what you were looking for? Find more on Custom Content Editor Web Part with JavaScript Or get search suggestion and latest updates.




Tagged: