Archive for the ‘Portal’ Category

Cross-domain webservice calls using JSONP

JSONP-teaser

The JavaScript class library for SharePoint 2010 enables developers to create rich SharePoint applications using pure JavaScript. If combined with the jQuery library, the power of JavaScript solutions is limitless,….. or isn’t it.

The Same Origin Policy prevents access to resources on other domains. Put simply; you cannot call a webservice from JavaScript that is hosted on another domain. There is however one exception to this claim; browsers allow the <script>-tag to call JavaScript files that are hosted on another domain. The technique JSONP exploits this opportunity.

(more…)

Changing the URL of an existing document library or list

Changing the URL of an existing document library or list

When you create a new list or document library in SharePoint the Name you supply for your new list is also used to in the URL. Characters like spaces are replaced by their HTML equivalents (%20). Changing the title of the list afterwards is easy, so is changing the URL of an existing list. You just have to know where to look. This post explains how to change both the title and the URL of existing lists and libraries using several techniques.

(more…)

Load an external JavaScript file on demand using a Custom Action in SharePoint 2007

Load an external JavaScript file on demand using a Custom Action in SharePoint 2007

I build a lot of SharePoint Solutions that use JavaScript to enhance user experience. Most of the JavaScript I put in dedicated .js files and deploy them to the 12-hive (or 14-hive) in the layouts-folder. Deploying a JavaScript file (*.js) layouts-folder of SharePoint and loading external JavaScript files (*.js) in SharePoint 2007 can be accomplished in a couple of ways.

(more…)

Fancy SharePoint navigation using jQuery and the Client Side Object Model

Fancy SharePoint navigation using jQuery and the Client Side Object Model

SharePoint offers OOTB navigation such as the Top Link Bar and the Quick Launch. Using jQuery and animations you can create a more appealing way of navigation for your SharePoint site. In this post I describe how to leverage the Links list using the Client Side Object Model in JavaScript to provide a fancy way of navigating your site.

(more…)

Changing the Window Title programmatically in SP2010

Changing the Window Title programmatically in SP2010

SharePoint uses a placeholder with the name “PlaceHolderPageTitle” to influence the window title. You can set the window title by putting text in this placeholder. But if you want the window title to be based on other parameters, let’s say the current user, it is also possible to change the window title programmatically. (more…)