I'm struggeling with a weird behavior on some of my pages. It occurs both on plain site pages and on web part pages:

I have built various form-webparts and exported them. They all are referencing js-libraries stored in a public document-library. When I upload one of the exported webparts to a page, everything works fine, the libraries in the webparts are loaded and the sripts are executed.

Now when I add multiple webparts to one page, only one webpart is working. E.g. when I have a web part page and add 2 or more to it, only the one below the 2 others is loaded. All other webparts fail and there is the javascript error, stating that "Object doesn't support this property or method" - like the libraries with the plugins wouldn't have been loaded.

Is it simply impossible to have multiple form-webparts which all reference different js-libraries on one page?

1 Answer 1


You should check if js library is already on page if it is - don't add it second time if it is not on page - load it.

  • Thanks, avoiding duplicates seem to work. Though I noticed that on my "Development"-SP Sites referencing libraries multiple times and even mixing versions works smoothly.
    – curmudgeon
    Commented Oct 31, 2012 at 13:41
  • In addition to @m.jedrzej: Everyone, make sure to always use "jQuery" instead of "$"! Will save you a lot of trouble ;)
    – curmudgeon
    Commented Oct 31, 2012 at 15:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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