SharePoint 2007 Error – Please wait while scripts are loaded….

You may come across the annoying error on the browser status bar – “Please wait while scripts are loaded..” in the MOSS 2007 environment while viewing the pages.

The reason for this cryptic error message is SharePoint having issues finding the browser elements using the document.getElementById methods specified in the Javascript. In many cases, this error may caused because of SharePoint Custom Branding started out with the minimal.master or custom master pages and SharePoint OOB Javascript or Your custom Javascript code is trying to access the HTML elements not available in the browser HTML element tree.

There are many ways to find the missing HTML elements with ID…
Step 1 – Search for the document.getElementById in browser source (View->Source in the IE) and make sure all the elements specified in the document.getElementById are exists in the browser.

Step 2 – If above step verifies that all the elements specified in the document.getElementById exists in the browser souce code, next step would be finding document.getElementById in the imported javascript using the <script src=”/_layouts/CustomJS/scripts/custom.js” type=”text/javascript” charset=”utf-8″></script> tags in the master pages or inline scripts <script language=”JavaScript” type=”text/javascript”>document.getElementById(“MissingElement”);</script> in the ascx or aspx files.

Best way to find the missing javascript elements is using the FireBug for the firefox or IE Developver Toolbar for IE browsers. Here is the screen showing debugging through the IE Developer Toolbar. Open the troublesome page in the IE 8. Hit F12 to open the IE Developer Toolbar. It should automatically load the HTML, Script, and CSS of the SharePoint page. Click on the Scripts tab and click on the Start Debugging and it should show the troublesome javascript document.getElementById code.

Once you find the troublesome Javascript code and missing HTML elements, review the code and make sure either faulty Javascript is commented out or missing HTML elements exists in the source code. This will sure fixes the problem with “Please wait while scripts are loaded..” error.

Brendon Schwartz has already explained this issue on their blog. You may want to check it out.
http://www.devcow.com/blogs/adnrg/archive/2007/09/17/9590.aspx

Hope you may come across this blog to resolve this error.

Advertisements
This entry was posted in SP2007 DEV. Bookmark the permalink.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s