SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a SharePoint solution with an Application Page, which references several Javascript files. I have a sandbox server where I test and a production server. I did not set up either of these environments. When I deploy the solution on the sandbox server, everything works fine. When I deploy the solution on the production server, I get a Javascript error. The error indicates that a particular function "is not a function".

If I comment out the first offending line, I get the same error again when it tries to execute another function.

Are there any setup issues that might account for the difference in behavior between these two environments? I am deploying the same exact WSP files in each case.

share|improve this question
Is this particular function yours, or is it something else which is not being loaded correctly? – Anatoly Mironov Feb 6 '13 at 6:09
The first function was the .dialog() function in jquery UI. The second one was one I wrote. – Jeremy Feb 6 '13 at 22:21
Did you ever get this figured out? – Steve Lineberry Feb 14 '13 at 19:52

Try using fiddler ( to make sure that all of your js files are bring loaded properly.

Once you have determined that they are all being loaded in the browser, use the IE dev tools (F12) and set some breakpoints in your js code and that might help determine the issue.

It could also be a timing issue of maybe not all of the js code is loaded when you are making your call. Does any of your JS code depend on the CSOM or SharePoint JS libraries? If so are you using ExecuteOrDelayUntilScriptLoaded ( to call your function?

share|improve this answer

I found a solution. Instead of putting the script tags in this placeholder:

<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">

I am putting them in this placeholder

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.