Skip Ribbon Commands
Skip to main content

Ben There, Done That

:

SharePoint Ben > Ben There, Done That > Posts > JavaScript error editing Web Parts on a SharePoint Page
May 21
JavaScript error editing Web Parts on a SharePoint Page

I was working with a client over the last few days on building a Project Workspace site template.  We were nearly finished and had to make a couple last edits to a web part when we hit the JavaScript error.  When expanding the details of the error it was similar to:

line: 2135
Char: 4
Error: 'style.display' is null or not an object
code: 0

This error was keeping us from adding web parts and modifying current web parts (we could still delete web parts, but only by using http://url/default.aspx?contents=1 to get to our web part maintenance page).

I did some researching and thanks to this thread, I found this solution:

1)  Place page in edit mode
2)  Edit the content of the content editor web part by selecting the
'modify web part' drop down menu
3)  Select the Rich Text Editor and copy the text if you do not want
to lose it.
4)  Select Source Editor button, this opens the HTML source code for
the CE Web Part
5)  Remove the source code.  Our source code had a conflicting ID.
6)  Update CE web part and make sure source code does not have auto
generated code, or just add a new content editor web part.

The thread varies on what web parts people had on the page, in our case, we only had one content editor web part and then several list web parts.  Once we removed our single content editor web part, everything worked beautifully.

 

 Comments

 
 
 
 
 
 
 
 
 
 
 

Glad you liked it. Would you like to share?

Sharing this page …

Thanks! Close

Add New Comment

 

Showing 0 comments

    Trackback URL
     
    blog comments powered by Disqus
     

     Pre-Disqus Integration Comments

     

    Comments

    JavaScript error editing Web Parts on a SharePoint Page

    Hi,

    Nice sharing, you save me alot thanks. plzz continue your sharings.
    Benjamin.SteginkNo presence information on 3/17/2011 2:20 PM