Javascript Libraries to use with SharePoint 2007

Recently I had to develop an ASP.NET control for a client that was to be used on an application page of a workflow in SharePoint. The control required a few little fancy things on the frontend so I went in search for a decent Javascript library that would help ease the pain of working with Javascript and supporting multiple browsers. Initially I attempted to use MochiKit and Prototype.js and immediately found compatibility problems with both of these libraries and SharePoint. So far the only library I have found that appears to be completely compatible with SharePoint is jQuery [].

I’ll admit at this point that I have only ever used the basics of MochiKit and Prototype.js to achieve whatever it was I was required to do in Javascript. With jQuery I was immediately faced with a completely foreign way of querying for HTML elements. I had become accustomed to getting the elements by ID but with jQuery you can query based on things such as the class declared. This is extremely powerful when using it for SharePoint and ASP.NET as any ASP.NET generated elements will have a generated ID which inevitably makes it difficult to reference the element using client-side javascript. Of course if you query on the class that is being used for the style the problem is alleviated as the class can be allocated by the coder and is not generated at runtime.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s