NerdyHearn
Home
Blog

Contact
Mailing List

Software

Active Directory Products
Object Compare
Permission Compare

IPhone Products
Calls To Calendar
SMS To CSV
SMS To Gmail
Voicemail To Gmail

Sites
DocuTerminal
How Long For Me
My Music To Me
SaveMySerials
TypeCount

Blog
Twitter

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.

Tags

SharePoint JavaScript

Related Blogs

Retrieving data from SharePoint SOAP Requests using LINQ
Adding jQuery to SharePoint
Adding a Custom ASP.NET Page to MOSS/WSS
Fixing Access Denied While creating a new page in MOSS/WSS
Understanding SharePoint Template Ids

Comments

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

Hi,

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

Hi,
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?
Thanks

Add A Comment

Name:


URL:


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


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. DocuTerminal - Online Filing Cabinet solution. Scan, search and archive your paper documents. SaveMySerials - Protect yourself from theft, fire, natural disasters and more by recording your serial numbers My Music To Me - Stream your subsonic music collection to your Sonos wireless system TypeCount - Count how often you type across different computers! ServrTrackr - Monitor your SSL certificates, website uptime, and DNS configurations