Mailing List



NerdyHearn - Blog

<< Back To All Blogs

What causes "Please wait while scripts are loaded..." in SharePoint

Friday, September 26th, 2008

Continuing with some of my recent SharePoint frustrations, I was receiving the message "Please wait while scripts are loaded..." in the status bar of IE while doing some JavaScript front end development. I was continually receiving this message, and this message would not disappear (even after the page had finished loading).

Back to the trusty ol' VS 2008 for some JavaScript debugging, and after stepping through a whole bunch of nasty Microsoft functions I finally came across the block where it was pushing this to the status bar.

What was happening was my script was actually failing, but because of the order in which these events were occurring their check to see if the page had finished loading was actually eating the exception thrown by my code. In short, my code wasn't performing properly, nor was the code from Microsoft.

How do you get around this? Well, let's just start by saying that this is definitely a hack, and this goes from me tracing what actually occurs their function to trigger, but you can put the following code before your code:

g_pageLoadComplete = true

And the message will no longer appear (hence, the REAL error message will now appear). This might speed some things up for some of you JavaScript SharePoint guys out there, as I had no idea what, how, when, or why my script was causing the problem.

SharePoint Tom Out.


SharePoint JavaScript

Related Blogs

Determining if MOSS is Standard or Enterprise
Creating a dynamic SharePoint settings DropDown using a ToolPart
Adding Custom Menu Item to MOSS/WSS List Actions Menu


Kate said on Thursday, March 25th, 2010 @ 4:24 PM


This worked beautifully. Thankyou!

Tom said on Friday, March 13th, 2009 @ 8:52 AM

Hi Julien,
I actually didn't debug it in Visual Studio. I had to load up the script files as resources (that could be viewed without obfuscation) on the SharePoint server. I would then step through using FireBug and change the script server-side as necessary (this was on a development server, I would not recommend that for a live server).

Hope that helps!

Julien said on Friday, March 13th, 2009 @ 8:02 AM

I'm currently experiencing the same problem, but adding the javascript instruction didn't solve it.
How did you manage to debug your SharePoint master page javascript code from VS?

Add A Comment



Email Address: (not public, used to send notifications on further comments)


Enter the text above, except for the 1st and last character:

NerdyHearn - Latest tech news relating to C#, ASP.NET, SharePoint, PHP, general development, and more. SaveMySerials - Protect yourself from theft, fire, natural disasters and more by recording your serial numbers