Welcome to Atlanta .NET Regular Guys Sign in | Join | Help

Be careful about hard coding Javascript in SharePoint 2007

Have you ever gotten "Please wait while scripts are loaded..." in SharePoint 2007?  This is caused by a script error on the current SharePoint page.  To solve this problem just fix the javascript errors on the page and it should go away.  If you are a using a minimal or custom WCM master page you might run into this.  One place you might see this after applying a new master page is in the Survey form.  This is due to a hard coded script line in a content area that tries to set an element without checking if the element exists first.  Actually this should happen in an list that uses the form.aspx where the code actually lives.

<script id="onetidPageTitleAreaFrameScript">
    document.getElementById("onetidPageTitleAreaFrame").className="ms-areaseparator";
</script>

If you don't have this element the message to wait for scripts will never go away.  To define the element just add it to a table as defined on the default.master page like the following table row:

<td valign=top id="onetidPageTitleAreaFrame" class='ms-pagetitleareaframe' nowrap>

Published 17-09-2007 07:27 by Brendon Schwartz

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

What do you think?

(required) 
(optional)
(required) 

About Brendon Schwartz

Brendon Schwartz has worked in the Atlanta area User Group scene and is known around town as one of the Atlanta .Net Regular Guys (www.devcow.com). He is currently on the INETA Board of Directors as the Vice President of Technology and is a Microsoft MVP for ASP.NET. Today, Brendon works to solve real world business problems with Microsoft technologies, such as SharePoint, Office, BizTalk, VSTS, and .NET technologies. In addition to presenting at local user groups, he helped create the Free Training 1,2,3! series (www.freetraining123.com) to help developers learn Microsoft technologies. He presented material at the first SharePoint 1,2,3! event (www.sharepoint123.com) along with other members of the Atlanta Microsoft Professionals. Brendon has helped on the leadership teams of five different user groups, and has been interviewed for his community efforts on Pod Casts - including the ASP.NET Pod Cast, .NET Rocks! (Carl Franklin Road Show - Atlanta) and the SharePoint Show Pod Cast. At the first Atlanta Code Camp in 2005, he presented material on ASP.NET mobile controls.
SkinName:iroha_Blog2
Powered by Community Server, by Telligent Systems