Tuesday, December 27, 2011

"Please wait while scripts are loaded..." message in status bar

While working with sharepoint front end development using Javscripts, some times I continuously receive the message in status bar "Please wait while scripts are loaded...". It continues to display the same even when the page is loaded completely.

This is because my javscript code is failing but it wont throw the actual error message but this status message.
This happens because of the order of the events triggered. as one of the function was checking whether the page has loaded which is being stopped by the exception in my javascript function and the status indefinetly shows this message.

To trace the actual error message place the following line of code before your code.

g_pageLoadComplete = true
By this code, you can actually see the real error message and the status message, "Please wait while scripts are loaded.." will no longer appear. Now you can actually concentrate on solving the real error.

Note: Do not forget to remove this line of code once you fix everything.



No comments:

Post a Comment