Sladescross's Blog

Blogging about Sharepoint related stuff

Sharepoint Custom Javascript April 26, 2010

Filed under: Custom,Javascript,Sharepoint — sladescross @ 8:49 pm

SharePoint ScriptLink control (< SharePoint:Link />)

function getTagFromIdentifierAndTitle(tagName, identifier, title) {

  var len = identifier.length;

  var tags = document.getElementsByTagName(tagName);

  for (var i=0; i < tags.length; i++) {

    var tempString = tags[i].id;

    if (tags[i].title == title && (identifier == “” || tempString.indexOf(identifier) == tempString.length – len)) {

      return tags[i];



  return null;



Use content editor web part.

Add web parts to content pages.


Append ?Contents=1 to the webpart page’s URL to display the Webpart Maintenance Page

About these ads

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s


Get every new post delivered to your Inbox.

Join 63 other followers