<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Jan Tielens' Bloggings</title><subtitle type="html">Joy, frustration, excitement, madness, aha's, headaches, ... codito ergo sum!</subtitle><id>http://weblogs.asp.net/jan/atom.aspx</id><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jan/default.aspx" /><link rel="self" type="application/atom+xml" href="http://weblogs.asp.net/jan/atom.aspx" /><generator uri="http://communityserver.org" version="3.0.20510.895">Community Server</generator><updated>2009-05-26T07:02:00Z</updated><entry><title>SharePoint 2010 Public Beta Available on MSDN</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jan/archive/2009/11/16/sharepoint-2010-public-beta-available-on-msdn.aspx" /><id>http://weblogs.asp.net/jan/archive/2009/11/16/sharepoint-2010-public-beta-available-on-msdn.aspx</id><published>2009-11-16T17:29:00Z</published><updated>2009-11-16T17:29:00Z</updated><content type="html">&lt;P mce_keep="true"&gt;Finally the public betas of SharePoint 2010 (both SharePoint Foundation and SharePoint Server),&amp;nbsp;Office 2010,&amp;nbsp;SharePoint Designer 2010 and&amp;nbsp;Visio 2010&amp;nbsp;are available on &lt;A href="https://msdn.microsoft.com/en-us/subscriptions/securedownloads/default.aspx" mce_href="https://msdn.microsoft.com/en-us/subscriptions/securedownloads/default.aspx"&gt;MSDN Subscriptions&lt;/A&gt;, so start your download engines right now! :-)&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG src="http://storage.tielens.name/sp2010betaonmsdn.jpg" mce_src="http://storage.tielens.name/sp2010betaonmsdn.jpg"&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;If you don't see the download, you can use &lt;A href="https://msdn.microsoft.com/en-us/subscriptions/securedownloads/default.aspx?PV=42%3a393%3aEXE%3aen%3ax64" mce_href="https://msdn.microsoft.com/en-us/subscriptions/securedownloads/default.aspx?PV=42%3a393%3aEXE%3aen%3ax64"&gt;this direct link&lt;/A&gt; (make sure you are signed in to the Download Center before you click the link).&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7256843" width="1" height="1"&gt;</content><author><name>jantie</name><uri>http://weblogs.asp.net/members/jantie.aspx</uri></author><category term="SharePoint" scheme="http://weblogs.asp.net/jan/archive/tags/SharePoint/default.aspx" /></entry><entry><title>Introducing SharePoint 2010 Training at U2U</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jan/archive/2009/11/06/introducing-sharepoint-2010-training-at-u2u.aspx" /><id>http://weblogs.asp.net/jan/archive/2009/11/06/introducing-sharepoint-2010-training-at-u2u.aspx</id><published>2009-11-06T06:12:00Z</published><updated>2009-11-06T06:12:00Z</updated><content type="html">&lt;P&gt;During the last couple of weeks, we at &lt;A href="http://www.u2u.be/" mce_href="http://www.u2u.be"&gt;U2U&lt;/A&gt; have been very busy building course material for our upcoming SharePoint 2010 courses. We expect that lots of experienced SharePoint developers, power users and administrators are very eager to get up to speed with the new version of SharePoint as soon as possible. That’s why the first course that we’ve build is titled &lt;STRONG&gt;&lt;A href="http://www.u2u.be/CoursePage.aspx?CODE=USP10U" target=_blank mce_href="http://www.u2u.be/CoursePage.aspx?CODE=USP10U"&gt;Upgrade to SharePoint 2010&lt;/A&gt;&lt;/STRONG&gt;. This course will focus on all the exciting new stuff in SharePoint 2010, so people with SharePoint experience will get all the relevant info as quickly as possible. Because an administrator is probably not interested in developer stuff, we’ve chosen to split the course into three different parts:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Part 1: Tools and Technologies (2 days)&lt;BR&gt;&lt;/STRONG&gt;The focus of the first part of this course is on everything what’s new in SharePoint 2010 from a power user perspective. That means: everything you can configure in SharePoint 2010 without writing custom code. We’ll start with an overview of the new SharePoint 2010 platform, after that all the important new features will be discussed separately. Although this part will not involve building code customizations, it’s important for technical people (developers, architects, IT-Pro’s …) as well to know about these important new and enhanced features.&lt;BR&gt;&lt;STRONG&gt;Part 2: The Development Platform (2 days)&lt;/STRONG&gt;&lt;BR&gt;SharePoint 2007 already was a very extensible platform: as a developer you could enhance and extend the out-of-the-box functionality using some powerful techniques. Unfortunately developing for SharePoint 2007 often required to developer to spend lots of time writing XML, using command line utilities,… This part of the course will focus on the new development tools in Visual Studio 2010 which will make the life of SharePoint developers a lot easier, and the new developer opportunities in SharePoint 2010.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Part 3: Administration and Configuration (1 day)&lt;BR&gt;&lt;/STRONG&gt;Also for IT-Pro’s and System Administrators SharePoint 2010 has lots of new functionality. In this final part of the course, we’ll focus on how SharePoint 2010 can make the life of administrators significant easier.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;If you are a &lt;STRONG&gt;developer or architect &lt;/STRONG&gt;I’d recommend you to follow all three parts of the course (yes even the administration and configuration part). If you are a &lt;STRONG&gt;power user, end user, manager or business decision maker &lt;/STRONG&gt;(thus not a very technical person), I’d recommend you to attend the first part of our course. Finally if you are an &lt;STRONG&gt;IT-Pro or system administration&lt;/STRONG&gt;, part 1 and 3 are relevant for you. You can read &lt;A href="http://www.u2u.be/CoursePage.aspx?CODE=USP10U" mce_href="http://www.u2u.be/CoursePage.aspx?CODE=USP10U"&gt;the full course description at the U2U site&lt;/A&gt;, and check out the schedule (the course is already scheduled in Brussels, Belgium in December and January, but we can deliver &lt;A href="http://www.u2u.be/Onsite.aspx" mce_href="http://www.u2u.be/Onsite.aspx"&gt;on-site courses as well&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;In the near future U2U will expand its SharePoint 2010 training offerings to facilitate the needs of everybody who wants to get in the SharePoint 2010 game, even if you don’t have experience with the previous versions of SharePoint. So make sure you visit the &lt;A href="http://www.u2u.be/" mce_href="http://www.u2u.be"&gt;U2U site&lt;/A&gt; once in a while to see if there is anything new. Alternatively you can subscribe to our newsletter over there, or you can follow us on Twitter as well (&lt;A href="http://twitter.com/u2u" mce_href="http://twitter.com/u2u"&gt;@u2u&lt;/A&gt;) or visit &lt;A href="http://www.facebook.com/home.php#/pages/U2U/158147774827" mce_href="http://www.facebook.com/home.php#/pages/U2U/158147774827"&gt;our Facebook page&lt;/A&gt;&amp;nbsp;(and become a fan!).&lt;/P&gt;
&lt;P&gt;People that are attending &lt;A href="http://www.microsoft.com/europe/teched/" mce_href="http://www.microsoft.com/europe/teched/"&gt;TechEd Europe in Berlin next week&lt;/A&gt;, make sure to visit the U2U booth to check out our new course material, and to receive &lt;STRONG&gt;a free SharePoint 2010 t-shirt&lt;/STRONG&gt; (just mention that Jan sent you :-) ). If you have any questions and I’m not at the booth, feel free to ask for me. Or you can attend my &lt;A href="http://weblogs.asp.net/jan/archive/2009/11/04/join-my-bof-session-at-teched-europe-about-sharepoint-jquery-and-silverlight.aspx" mce_href="http://weblogs.asp.net/jan/archive/2009/11/04/join-my-bof-session-at-teched-europe-about-sharepoint-jquery-and-silverlight.aspx"&gt;BoF Session about SharePoint, Silverlight and jQuery&lt;/A&gt; on Thursday.&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7248178" width="1" height="1"&gt;</content><author><name>jantie</name><uri>http://weblogs.asp.net/members/jantie.aspx</uri></author><category term="SharePoint" scheme="http://weblogs.asp.net/jan/archive/tags/SharePoint/default.aspx" /></entry><entry><title>Join my BoF Session at TechEd Europe about SharePoint, jQuery and Silverlight</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jan/archive/2009/11/04/join-my-bof-session-at-teched-europe-about-sharepoint-jquery-and-silverlight.aspx" /><id>http://weblogs.asp.net/jan/archive/2009/11/04/join-my-bof-session-at-teched-europe-about-sharepoint-jquery-and-silverlight.aspx</id><published>2009-11-04T15:21:00Z</published><updated>2009-11-04T15:21:00Z</updated><content type="html">&lt;P mce_keep="true"&gt;I’ve got the pleasure to be able to present a &lt;A href="http://www.msteched.com/europe/Public/networking.aspx" mce_href="http://www.msteched.com/europe/Public/networking.aspx"&gt;Birds-of-a-Feather&lt;/A&gt; (BoF) session at &lt;A href="http://www.microsoft.com/europe/teched/" mce_href="http://www.microsoft.com/europe/teched/"&gt;TechEd Europe next week&lt;/A&gt;: &lt;STRONG&gt;BOF14 Microsoft SharePoint, jQuery and Microsoft Silverlight: Better Together&lt;/STRONG&gt;. If you are interested in these technologies please join the discussion on Thursday, 12:20 in Theater 6 – Pink.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Feel free to comment if you are planning to attend, it’s nice to know who’ll be there! :-)&lt;/P&gt;
&lt;P align=center mce_keep="true"&gt;&lt;IMG style="WIDTH: 180px; HEIGHT: 199px" align=middle src="http://www.msteched.com/resources/Content_Files/TechEd_Europe_Blog_LP_Speak.gif" width=180 height=199 mce_src="http://www.msteched.com/resources/Content_Files/TechEd_Europe_Blog_LP_Speak.gif"&gt;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7246992" width="1" height="1"&gt;</content><author><name>jantie</name><uri>http://weblogs.asp.net/members/jantie.aspx</uri></author><category term="SharePoint" scheme="http://weblogs.asp.net/jan/archive/tags/SharePoint/default.aspx" /></entry><entry><title>Watch the SharePoint Conference Live, from your home/office (9am Pacific, 6pm CET)</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jan/archive/2009/10/19/watch-the-sharepoint-conference-live-from-your-home-office-9am-pacific-6pm-cet.aspx" /><id>http://weblogs.asp.net/jan/archive/2009/10/19/watch-the-sharepoint-conference-live-from-your-home-office-9am-pacific-6pm-cet.aspx</id><published>2009-10-19T15:30:00Z</published><updated>2009-10-19T15:30:00Z</updated><content type="html">&lt;P mce_keep="true"&gt;In 20 minutes a very important event is going to get started: the &lt;A href="http://www.mssharepointconference.com/Pages/default.aspx" mce_href="http://www.mssharepointconference.com/Pages/default.aspx"&gt;SharePoint Conference 2009&lt;/A&gt;! If you're not in Vegas (like me), get yourself in front of a computer with a big bag of chips, popcorn or whatever snack you prefer, and watch the keynote (featuring Steve Ballmer) live! I'm sure it will be a nice show and expect an avalanche of SharePoint 2010 information to be released shortly afterwards. Also make sure you keep an eye on Twitter, blogs, Facebook etc. to see the reactions of SharePoint fans all over the world. My buddies at EndUserSharePoint are going to cover the conference with lots of real time content, so &lt;A href="http://bit.ly/2Qy21l" target=_blank mce_href="http://bit.ly/2Qy21l"&gt;these pages&lt;/A&gt; will be open on my pc as well. Have fun!&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7233046" width="1" height="1"&gt;</content><author><name>jantie</name><uri>http://weblogs.asp.net/members/jantie.aspx</uri></author><category term="SharePoint" scheme="http://weblogs.asp.net/jan/archive/tags/SharePoint/default.aspx" /></entry><entry><title>Assembly-Free jQuery in SharePoint Sites Using the SmartTools jQueryLoader</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jan/archive/2009/10/14/assembly-free-jquery-in-sharepoint-sites-using-the-smarttools-jqueryloader.aspx" /><id>http://weblogs.asp.net/jan/archive/2009/10/14/assembly-free-jquery-in-sharepoint-sites-using-the-smarttools-jqueryloader.aspx</id><published>2009-10-14T18:48:00Z</published><updated>2009-10-14T18:48:00Z</updated><content type="html">&lt;P&gt;&lt;I&gt;&lt;B&gt;Summary: &lt;/B&gt;The SmartTools jQueryLoader enables the jQuery Javascript library in your SharePoint sites using an effortless and Assembly-Free deployment technique. Additionally the jQueryLoader will dynamically load custom Javascript files, deployed to a Document Library. Seeing is believing: watch this short screencast that shows the deployment and some sample scripts! &lt;/I&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://jqueryloader.codeplex.com/Release/ProjectReleases.aspx" mce_href="http://jqueryloader.codeplex.com/Release/ProjectReleases.aspx"&gt;Download the SmartTools jQueryLoader Installer&lt;/A&gt; from &lt;A href="http://jqueryloader.codeplex.com/" mce_href="http://jqueryloader.codeplex.com/"&gt;the Codeplex project&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www.youtube.com/watch?v=8DQrNpnSeXs" mce_href="http://www.youtube.com/watch?v=8DQrNpnSeXs"&gt;Watch the short (8 minutes) screencast&lt;/A&gt; that shows the deployment and some sample scripts.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;If you read my blog you probably know that using the &lt;A href="http://jquery.com/" mce_href="http://jquery.com"&gt;jQuery Javascript library&lt;/A&gt; in SharePoint 2007 sites can enhance and extend the out-of-the-box user interface significantly. But up to now it was time consuming and a tedious job to enable jQuery in SharePoint sites, for example: adding a &lt;B&gt;Content Editor Web Part&lt;/B&gt; to the page, open the properties, copy/paste a script using the Source dialog etc. Even worse: these steps needed to be done on every page where the desired jQuery functionality should become active.&lt;/P&gt;
&lt;P&gt;These issues can be solved by using the new &lt;B&gt;SmartTools jQueryLoader&lt;/B&gt; that I’m releasing today! The SmartTools jQueryloader basically is a Javascript file that dynamically loads additional custom Javascript files stored in a predefined &lt;B&gt;Document Library. &lt;/B&gt;This Document Library has extra columns to specify when and in what order those Javascript files should be loaded. So making available a new &lt;B&gt;js&lt;/B&gt; file (containing your next amazing extension) in your SharePoint sites will be as easy as uploading that file to the Document Library. The jQueryLoader will take care of loading your script accordingly.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://storage.tielens.name/jqueryloader1.jpg" mce_src="http://storage.tielens.name/jqueryloader1.jpg"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The jQueryLoader script itself, and the jQuery library as well, need to be loaded of course in every page in your SharePoint sites. This is accomplished by making a small change to the &lt;B&gt;Master Page &lt;/B&gt;that’s in use in your SharePoint sites. All these configuration steps, including the creation of the Document Library, changing the Master Page, adding the jQueryLoader etc, are executed with an &lt;B&gt;automated installation page. &lt;/B&gt;The really cool thing about this installation page is that it’s a basic SharePoint &lt;B&gt;Site Page &lt;/B&gt;that &lt;B&gt;doesn’t contain any server side code; everything is accomplished using Javascript.&lt;/B&gt; That means that to make use of the jQueryLoader (and its installer), there is nothing that needs to be changed, configured or deployed on your servers! That’s what is called &lt;B&gt;Assembly-Free &lt;/B&gt;by the way.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://storage.tielens.name/jqueryloader2.jpg" mce_src="http://storage.tielens.name/jqueryloader2.jpg"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an overview of the installation steps:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Navigate to &lt;B&gt;any Document Library&lt;/B&gt; in a SharePoint site.&lt;/LI&gt;
&lt;LI&gt;Upload the &lt;B&gt;SmartToosls.jQueryLoader.Install.aspx&lt;/B&gt; file to that Document Library (this file can be deleted after the installation).&lt;/LI&gt;
&lt;LI&gt;Open the uploaded page by just clicking on it.&lt;/LI&gt;
&lt;LI&gt;Select the desired installation options by checking their checkboxes in the list. For a first-time installation you typically check at least the first four checkboxes (see below).&lt;/LI&gt;
&lt;LI&gt;Click the &lt;B&gt;Start Installation &lt;/B&gt;button and keep an eye on the &lt;B&gt;Installation Log &lt;/B&gt;at the bottom of the page.&lt;/LI&gt;
&lt;LI&gt;That’s it!&lt;/LI&gt;&lt;/OL&gt;The different installation options which can be selected are:&lt;BR&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;B&gt;Create js Document Library&lt;/B&gt;: will create a hidden Document Library called &lt;B&gt;js&lt;/B&gt;. This Document Library will have four custom columns:&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;B&gt;Autoload &lt;/B&gt;(true/false): to specify if the jQueryLoader should dynamically load the file&lt;/LI&gt;
&lt;LI&gt;&lt;B&gt;Sequence &lt;/B&gt;(number): to specify the order in which the files are loaded&lt;/LI&gt;
&lt;LI&gt;&lt;B&gt;ApplyTo&lt;/B&gt; (text): a regular expression to specify on which pages the file should be loaded&lt;/LI&gt;
&lt;LI&gt;&lt;B&gt;Group&lt;/B&gt; (text): an optional value to group different files together&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;&lt;B&gt;Create or update jquery.js&lt;/B&gt;: will upload the jQuery library to the js Document Library.&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;&lt;B&gt;Create or update smarttools.jqueryloader.js&lt;/B&gt;: will upload the jQueryLoader script to the js Document Library.&lt;/LI&gt;
&lt;LI&gt;&lt;B&gt;Update the default.master&lt;/B&gt;: will make a change to the default.master Master Page (or the one you select by changing the value in the textbox). This change adds three script tags in the head element of the HTML page.&lt;/LI&gt;
&lt;LI&gt;&lt;B&gt;Update the default.master of a child site&lt;/B&gt;: (optional) will make a change to the Master Page of a child site (see previous option). Notice that this child site will make use of js Document Library of the current site.&lt;/LI&gt;
&lt;LI&gt;&lt;B&gt;Add test Web Part (optional)&lt;/B&gt;: will add a test Web Part to the default.aspx (Home) page of the site to verify if jQuery is active.&lt;/LI&gt;
&lt;LI&gt;&lt;B&gt;Enhanced Tasks View, Task Notifications and AJAX Lists&lt;/B&gt; (all optional): will add various sample scripts to show of the power of jQuery in SharePoint see the demo screencast for more information.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;The optional sample scripts are just there to give you an idea what can be accomplished using jQuery in SharePoint sites, and to show you how easy it is to deploy them. The real added value is of course your creativity to build custom scripts making SharePoint even better. Feel free to contact me when you’ve got a cool sample as well!&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://storage.tielens.name/jqueryloader3.jpg" mce_src="http://storage.tielens.name/jqueryloader3.jpg"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7229701" width="1" height="1"&gt;</content><author><name>jantie</name><uri>http://weblogs.asp.net/members/jantie.aspx</uri></author><category term="SharePoint" scheme="http://weblogs.asp.net/jan/archive/tags/SharePoint/default.aspx" /></entry><entry><title>"The Office SharePoint Server Standard Web application features feature must be activated" on Windows Server 2008 R2</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jan/archive/2009/10/14/quot-the-office-sharepoint-server-standard-web-application-features-feature-must-be-activated-quot-on-windows-server-2008-r2.aspx" /><id>http://weblogs.asp.net/jan/archive/2009/10/14/quot-the-office-sharepoint-server-standard-web-application-features-feature-must-be-activated-quot-on-windows-server-2008-r2.aspx</id><published>2009-10-14T04:45:00Z</published><updated>2009-10-14T04:45:00Z</updated><content type="html">&lt;p&gt;When I was installing a brand new demo environment using Microsoft's latest and greatest platforms (Windows Server 2008 R2 and SQL Server 2008) I ran into an annoying issue related to SharePoint. The slipstreamed installation (including SP2) went fine, but when I tried to create a new Collaboration Portal or Publishing Portal I got the error: "&lt;b&gt;The Office SharePoint Server Standard Web application features feature must be activated at the web application level before this feature can be activated.&lt;/b&gt;".&lt;/p&gt;&lt;p&gt;After some searching I learned that MOSS SP2 was not correctly applied, re-installing MOSS SP2 solved the issue. Apparently this is a known issue which can be avoided by adding the Web Server Role before running the slipstreamed SharePoint installation.&lt;/p&gt;&lt;p&gt;Related posts:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/8b96663a-ed87-4ab4-bd59-33c7245a76d4" mce_href="http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/8b96663a-ed87-4ab4-bd59-33c7245a76d4"&gt;Error trying to activate Publishing Infrastructure&lt;/a&gt; (on Technet)&lt;a href="http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/8b96663a-ed87-4ab4-bd59-33c7245a76d4" mce_href="http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/8b96663a-ed87-4ab4-bd59-33c7245a76d4"&gt;&lt;br&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://oidatsmyleg.wordpress.com/2009/09/21/add-web-server-role-before-installing-sharepoint/" mce_href="http://oidatsmyleg.wordpress.com/2009/09/21/add-web-server-role-before-installing-sharepoint/"&gt;Add Web Server role before installing SharePoint&lt;/a&gt; (blog post)&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7229497" width="1" height="1"&gt;</content><author><name>jantie</name><uri>http://weblogs.asp.net/members/jantie.aspx</uri></author><category term="SharePoint" scheme="http://weblogs.asp.net/jan/archive/tags/SharePoint/default.aspx" /></entry><entry><title>Make SharePoint 2007 Act Like SharePoint 2010, Updated</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jan/archive/2009/09/30/make-sharepoint-2007-act-like-sharepoint-2010-updated.aspx" /><id>http://weblogs.asp.net/jan/archive/2009/09/30/make-sharepoint-2007-act-like-sharepoint-2010-updated.aspx</id><published>2009-09-30T19:22:00Z</published><updated>2009-09-30T19:22:00Z</updated><content type="html">&lt;P&gt;In &lt;A href="http://weblogs.asp.net/jan/archive/2009/09/11/make-sharepoint-2007-act-like-sharepoint-2010-sort-of.aspx" mce_href="http://weblogs.asp.net/jan/archive/2009/09/11/make-sharepoint-2007-act-like-sharepoint-2010-sort-of.aspx"&gt;my previous post&lt;/A&gt; I introduced a small script to extend the Edit Control Block (ECB) of list items and documents. The added menu items in the ECB allow users to update certain metadata fields for that item or document. The cool thing is that everything is happening in the background with the help of &lt;A href="http://jquery.com/" mce_href="http://jquery.com"&gt;jQuery&lt;/A&gt;, even the actual updating of the data. The result: no postbacks or full page loads, pure AJAX goodness just like showcased in the SharePoint 2010 &lt;A href="http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/Overview-Video.aspx" mce_href="http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/Overview-Video.aspx"&gt;sneak peek videos&lt;/A&gt;. Today I’m releasing a new and improved version of the script, based on your feedback. Here are the changes:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;FONT size=3&gt;Column names can have a display name and an internal name&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;In the previous version of the script you’d had to specify the names of the columns you’d like to ajaxify based on the &lt;B&gt;internal name &lt;/B&gt;(which escapes spaces etc). In the new version of the script you can specify the &lt;B&gt;display name &lt;/B&gt;as well. For example this is a possible configuration for a &lt;B&gt;Task &lt;/B&gt;list:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;columns: ["Status", "Priority", "% Complete#PercentComplete", "Description#Body"]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;For the &lt;B&gt;Status &lt;/B&gt;and &lt;B&gt;Priority&lt;/B&gt; columns, no internal names are specified since they are the same as the display names. But notice that the next two columns have a # sign in them. The part preceding the # sign is the display name, the part after the # sign is the internal name from SharePoint.&lt;BR&gt;&lt;BR&gt;&lt;B&gt;&lt;FONT size=3&gt;Column values can have a display name and an internal name. &lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;This works exactly as the column names, so if there is a # sign, the first part will be the display value, the second part will be the internal value. For example this is the array of values for the % Complete column of a task list:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;["100%#1.00000000000000", "75%#0.750000000000000", "50%#0.500000000000000", "25%#0.250000000000000", "0%#0"]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Internally percentages are stored as values between 0 and 1. But we’d like show them as real percentages to the user of course: e.g. 100% will be displayed, while 1.00000000000 will be stored in SharePoint.&lt;BR&gt;&lt;BR&gt;&lt;B&gt;&lt;FONT size=3&gt;Multiple lists and document libraries can be configured in the same script. &lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Now you can also use the script if there is more than one list view web part on a page: in the &lt;B&gt;lists &lt;/B&gt;option of the &lt;B&gt;ajaxListConfig &lt;/B&gt;variable, multiple lists can be defined based on their name.&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;var ajaxListConfig = {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lists: &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp; name: "Tasks",&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; columns: [ ... ], &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; values: [ ... ] },&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp; name: "Issues",&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; columns: [ ... ], &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; values: [ ... ] },&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ],&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; debug: 0, // set to 1 to see log messages&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; animationSpeed: "fast" // possible values: "slow", "normal", "fast" or a number (milliseconds)&lt;BR&gt;};&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;FONT size=3&gt;User entered values are now supported. &lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;In the previous version, the user could only use the predefined values for a column (which makes lots of sense for Choice columns). In the new version, if the values option of a list configuration is equal to null (instead of an array of values), dialog is displayed in which the user can fill out a new value. For example in the &lt;B&gt;Task &lt;/B&gt;list below, the &lt;B&gt;Update Description &lt;/B&gt;menu item is displayed, but there is submenu to display the possible values.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://storage.tielens.name/ajaxlistsv2_1.jpg" width=265 height=326 mce_src="http://storage.tielens.name/ajaxlistsv2_1.jpg"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When the user clicks on the Update Description menu item, a dialog is displayed to allow the user to modify the value. Once again there are no postbacks. To display the dialog I’m using the &lt;A href="http://www.trentrichardson.com/Impromptu/index.php" mce_href="http://www.trentrichardson.com/Impromptu/index.php"&gt;Imprompty jQuery extension&lt;/A&gt; (included in my script). Notice that there is no Rich Text editing (yet), so HTML tags will be stripped out. Also there is no support for editing Person fields etc.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://storage.tielens.name/ajaxlistsv2_2.jpg" mce_src="http://storage.tielens.name/ajaxlistsv2_2.jpg"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;FONT size=3&gt;Finally ...&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;... some small bug fixes and performance enhancements are done. To use the script, configure it to your needs (when you download it, it’s configured for a default Task and Issue list), then follow these steps:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Navigate to the page where you would like to use it (e.g. http://yoursite//Lists/Tasks/AllItems.aspx for the Task list).&lt;/LI&gt;
&lt;LI&gt;Click Site Actions, Edit Page (top right).&lt;/LI&gt;
&lt;LI&gt;Click Add a Web Part.&lt;/LI&gt;
&lt;LI&gt;Select the Content Editor Web Part in the Miscellaneous section and click Add.&lt;/LI&gt;
&lt;LI&gt;Optionally drag the Content Editor Web Part to the bottom of the screen (otherwise a small space will be displayed on top of the page).&lt;/LI&gt;
&lt;LI&gt;Click open the tool pane in the web part.&lt;/LI&gt;
&lt;LI&gt;Click Source Editor ... in the properties task pane.&lt;/LI&gt;
&lt;LI&gt;Copy and paste the modified script in the Text Entry dialog and click Save.&lt;/LI&gt;
&lt;LI&gt;Click Exit Edit Mode (top right) and verify the result.&lt;/LI&gt;&lt;/OL&gt;You can &lt;A href="http://bit.ly/ODtNS" mce_href="http://bit.ly/ODtNS"&gt;download the script over here&lt;/A&gt;. Let me know if you have any issues and/or any feature requests!&lt;BR&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7220395" width="1" height="1"&gt;</content><author><name>jantie</name><uri>http://weblogs.asp.net/members/jantie.aspx</uri></author><category term="SharePoint" scheme="http://weblogs.asp.net/jan/archive/tags/SharePoint/default.aspx" /></entry><entry><title>Make SharePoint 2007 Act Like SharePoint 2010 (sort of ...)</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jan/archive/2009/09/11/make-sharepoint-2007-act-like-sharepoint-2010-sort-of.aspx" /><id>http://weblogs.asp.net/jan/archive/2009/09/11/make-sharepoint-2007-act-like-sharepoint-2010-sort-of.aspx</id><published>2009-09-11T17:19:00Z</published><updated>2009-09-11T17:19:00Z</updated><content type="html">&lt;P mce_keep="true"&gt;&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;A href="http://weblogs.asp.net/jan/archive/2009/09/30/make-sharepoint-2007-act-like-sharepoint-2010-updated.aspx" mce_href="http://weblogs.asp.net/jan/archive/2009/09/30/make-sharepoint-2007-act-like-sharepoint-2010-updated.aspx"&gt;&lt;STRONG&gt;This script has been updated over here&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;]&lt;/STRONG&gt; I'm pretty sure every SharePoint enthusiast has seen those great &lt;A href="http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/default.aspx" mce_href="http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/default.aspx"&gt;Sneak Peek videos&lt;/A&gt; Microsoft released some time ago. And I'm sure that lots of the new features shown were very exciting for lots of you. Since SharePoint 2010 is still quite far away in the future, let's try to bring some of the 2010 stuff to SharePoint 2007! In the &lt;A href="http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/Overview-Video.aspx" mce_href="http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/Overview-Video.aspx"&gt;overview video&lt;/A&gt;, &lt;A href="http://blogs.msdn.com/thomriz" mce_href="http://blogs.msdn.com/thomriz"&gt;Tom Rizzo&lt;/A&gt; showed some new user interface functionality, pretty much all of it was heavily using asynchronous Javascript code to dynamically do updates, change layouts etc. All of this of course to prevent those nasty full page reloads. One of the features that caught my eye was the inline editing of list items or documents: without reloading the page, or opening a new page, it's possible in SharePoint 2010 to edit meta data. Pretty cool! And I want to have it in my SharePoint sites, today.&lt;/P&gt;
&lt;P mce_keep="true"&gt;In &lt;A href="http://weblogs.asp.net/jan/archive/2009/09/11/customizing-the-sharepoint-ecb-with-javascript-part-3.aspx" mce_href="http://weblogs.asp.net/jan/archive/2009/09/11/customizing-the-sharepoint-ecb-with-javascript-part-3.aspx"&gt;my previous post&lt;/A&gt; I showed how you can add extra functionality to the Edit Control Block (ECB), let's take that technique and make it more flexible and customizable. Here is the result I'm looking for:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG src="http://storage.tielens.name/SharePoint2007as2010.gif" mce_src="http://storage.tielens.name/SharePoint2007as2010.gif"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Notice that everything you see is happening completely at the client side, without any code deployed to the server, without any full page postbacks. So how do you get this working in your SharePoint sites? Just download&amp;nbsp;&lt;A href="http://bit.ly/2BUSKh" mce_href="http://bit.ly/2BUSKh"&gt;this script file&lt;/A&gt; [&lt;A href="about:/jan/archive/2009/09/30/make-sharepoint-2007-act-like-sharepoint-2010-updated.aspx" mce_href="http://weblogs.asp.net/jan/archive/2009/09/30/make-sharepoint-2007-act-like-sharepoint-2010-updated.aspx"&gt;This script has been updated over here&lt;/A&gt;] and open it. On top of the script you'll find the &lt;STRONG&gt;ajaxListConfig&lt;/STRONG&gt; variable which you can change to customize the script:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;FONT face="courier new,courier"&gt;var ajaxListConfig = {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; columns&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :new Array("Status", "Priority"), // columns to ajaxify&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; values&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :new Array(&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new Array("Not Started", "In Progress", "Completed", &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"Deferred", "Waiting on someone else"), // values for Status&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new Array("(1) High", "(2) Normal", "(3) Low") // values for Priority&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; debug&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :0, // set to 1 to see log messages&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; animationSpeed&amp;nbsp; :"slow" // possible values: "slow", "normal", "fast" or a number (milliseconds)&lt;BR&gt;};&lt;/FONT&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;When you download the script, it's configured for a default Task list. If you want to enable it on other list types or Document Libraries, or you're running SharePoint in another language than English the following options need to be changed:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;&lt;STRONG&gt;columns&lt;/STRONG&gt;: in the array you need to type the names of the columns you want to ajax-enable&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;&lt;STRONG&gt;values&lt;/STRONG&gt;: for every column defined in the columns option, you need to provide an array of values&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;Optionally you can set the &lt;STRONG&gt;debug &lt;/STRONG&gt;option to 1, so a log window is being displayed in case something goes wrong. The &lt;STRONG&gt;animationSpeed &lt;/STRONG&gt;option allows you to set the speed of the fancy fade in and out effects for the updated values. When all options are set, follow these steps:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Navigate to the page where you would like to use it (e.g. &lt;A href="http://yoursite//Lists/Tasks/AllItems.aspx"&gt;http://yoursite//Lists/Tasks/AllItems.aspx&lt;/A&gt; for the Task list).&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Click &lt;STRONG&gt;Site Actions&lt;/STRONG&gt;, &lt;STRONG&gt;Edit Page&lt;/STRONG&gt; (top right).&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Click &lt;STRONG&gt;Add a Web Part.&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Select the &lt;STRONG&gt;Content Editor Web Part&lt;/STRONG&gt; in the &lt;STRONG&gt;Miscellaneous&lt;/STRONG&gt; section and click &lt;STRONG&gt;Add&lt;/STRONG&gt;.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Optionally drag the &lt;STRONG&gt;Content Editor Web Part &lt;/STRONG&gt;to the bottom of the screen (otherwise a small space will be displayed on top of the page).&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Click &lt;STRONG&gt;open the tool pane&lt;/STRONG&gt; in the web part.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Click &lt;STRONG&gt;Source Editor ... &lt;/STRONG&gt;in the properties task pane.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Copy and paste the modified script in the &lt;STRONG&gt;Text Entry &lt;/STRONG&gt;dialog and click &lt;STRONG&gt;Save&lt;/STRONG&gt;.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Click &lt;STRONG&gt;Exit Edit Mode &lt;/STRONG&gt;(top right) and verify the result.&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P mce_keep="true"&gt;Remember when the script doesn't work as expected, set the &lt;STRONG&gt;debug &lt;/STRONG&gt;option to 1 and you'll see the log messages appearing at the bottom right of the screen. Btw, thanks&amp;nbsp;my Twitter&amp;nbsp;buddies&amp;nbsp;who tested the script! (feel free to follow &lt;A href="http://twitter.com/jantielens" mce_href="http://twitter.com/jantielens"&gt;@jantielens&lt;/A&gt;).&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;A href="about:/jan/archive/2009/09/30/make-sharepoint-2007-act-like-sharepoint-2010-updated.aspx" mce_href="http://weblogs.asp.net/jan/archive/2009/09/30/make-sharepoint-2007-act-like-sharepoint-2010-updated.aspx"&gt;&lt;STRONG&gt;This script has been updated over here&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7201155" width="1" height="1"&gt;</content><author><name>jantie</name><uri>http://weblogs.asp.net/members/jantie.aspx</uri></author><category term="SharePoint" scheme="http://weblogs.asp.net/jan/archive/tags/SharePoint/default.aspx" /></entry><entry><title>Customizing the SharePoint ECB with Javascript, Part 3</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jan/archive/2009/09/11/customizing-the-sharepoint-ecb-with-javascript-part-3.aspx" /><id>http://weblogs.asp.net/jan/archive/2009/09/11/customizing-the-sharepoint-ecb-with-javascript-part-3.aspx</id><published>2009-09-11T13:00:00Z</published><updated>2009-09-11T13:00:00Z</updated><content type="html">Other articles in this series:&lt;BR&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://weblogs.asp.net/jan/archive/2009/09/03/customizing-the-sharepoint-ecb-with-javascript-part-1.aspx" mce_href="http://weblogs.asp.net/jan/archive/2009/09/03/customizing-the-sharepoint-ecb-with-javascript-part-1.aspx"&gt;Customizing the SharePoint ECB with Javascript, Part 1&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://weblogs.asp.net/jan/archive/2009/09/04/customizing-the-sharepoint-ecb-with-javascript-part-2.aspx" mce_href="http://weblogs.asp.net/jan/archive/2009/09/04/customizing-the-sharepoint-ecb-with-javascript-part-2.aspx"&gt;Customizing the SharePoint ECB with Javascript, Part 2&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;In the previous articles I explained the basic technique to add custom menu items to the &lt;SPAN style="FONT-WEIGHT: bold"&gt;Edit Control Block &lt;/SPAN&gt;(ECB) using Javascript. Basically it comes down to writing a Javascript function called &lt;SPAN style="FONT-WEIGHT: bold"&gt;Custom_AddListMenuItems&lt;/SPAN&gt; or &lt;SPAN style="FONT-WEIGHT: bold"&gt;Custom_AddDocLibMenuItems&lt;/SPAN&gt; (respectively for adding menu items to the ECB of Lists and Document Libraries). In these custom functions you can use the &lt;SPAN style="FONT-WEIGHT: bold"&gt;CAMOpt&lt;/SPAN&gt; Javascript function (found in the default core.js file) to add as many items as you want. Using the &lt;SPAN style="FONT-WEIGHT: bold"&gt;CASubM &lt;/SPAN&gt;function you can also build hierarchical menus.&lt;/P&gt;
&lt;P&gt;The next thing that I would like to discuss is how to create "context sensitive menu items" in the ECB using these techniques. What do I mean with "context sensitive"? Let’s take a look at the out-of-the-box ECB of a Document Library. In that ECB a menu item is displayed to &lt;SPAN style="FONT-WEIGHT: bold"&gt;Check Out &lt;/SPAN&gt;a document. But this menu item is only displayed when the document is not yet checked out. When the document is checked out, the ECB displays the &lt;SPAN style="FONT-WEIGHT: bold"&gt;Check In &lt;/SPAN&gt;and &lt;SPAN style="FONT-WEIGHT: bold"&gt;Discard Check Out &lt;/SPAN&gt;menu items instead. So based on the metadata of the document, the ECB is different in this scenario.&lt;/P&gt;
&lt;P&gt;&lt;IMG align=top src="http://storage.tielens.name/ecbjavascript3_1.jpg" width=212 height=325 mce_src="http://storage.tielens.name/ecbjavascript3_1.jpg"&gt; &amp;nbsp; &amp;nbsp; &lt;IMG src="http://storage.tielens.name/ecbjavascript3_2.jpg" width=207 height=345 mce_src="http://storage.tielens.name/ecbjavascript3_2.jpg"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To illustrate how you can build context sensitive ECB menu items yourself, let’s take the following example: we’ll enhance the ECB of a default &lt;SPAN style="FONT-WEIGHT: bold"&gt;Task list&lt;/SPAN&gt; so it shows menu items to quickly mark a task as Completed, In Progress etc. In the following screenshot the ECB for &lt;SPAN style="FONT-WEIGHT: bold"&gt;Test Task 1&lt;/SPAN&gt; is displayed. The &lt;SPAN style="FONT-WEIGHT: bold"&gt;Status&lt;/SPAN&gt; of that task is set to &lt;SPAN style="FONT-WEIGHT: bold"&gt;Not Started&lt;/SPAN&gt;, so the &lt;SPAN style="FONT-WEIGHT: bold"&gt;Update Status&lt;/SPAN&gt; menu item only displays In Progress, Complete, Deferred and Waiting child menu items.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://storage.tielens.name/ecbjavascript3_3.jpg" mce_src="http://storage.tielens.name/ecbjavascript3_3.jpg"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the same task list, there is also a &lt;SPAN style="FONT-WEIGHT: bold"&gt;Test Task 2&lt;/SPAN&gt; item for which the status is set to &lt;SPAN style="FONT-WEIGHT: bold"&gt;In Progress&lt;/SPAN&gt;. The &lt;SPAN style="FONT-WEIGHT: bold"&gt;Update Status&lt;/SPAN&gt; menu item in the ECB now displays Not Started, Complete, Deferred and Waiting.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://storage.tielens.name/ecbjavascript3_4.jpg" mce_src="http://storage.tielens.name/ecbjavascript3_4.jpg"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since the customized ECB is configured in a Javascript function (Custom_AddListMenuItems in this case), we need to be able to retrieve the Status value of the item for which the ECB is currently being rendered. The &lt;SPAN style="FONT-WEIGHT: bold"&gt;core.js&lt;/SPAN&gt; and &lt;SPAN style="FONT-WEIGHT: bold"&gt;init.js&lt;/SPAN&gt; out-of-the-box Javascript files, give us little meta data information: only the item ID, checked out status etc are available. In this case technically it is possible to retrieve the Status value of the list item by querying the &lt;SPAN style="FONT-WEIGHT: bold"&gt;HTML DOM&lt;/SPAN&gt;. Although this technique would work, it would only work if the needed meta data is actually displayed. E.g. if the &lt;SPAN style="FONT-WEIGHT: bold"&gt;Status &lt;/SPAN&gt;column would not be displayed in the view, the information could not be retrieved. Therefore I’m using another technique that retrieves the necessary meta data information by making a call to the &lt;SPAN style="FONT-WEIGHT: bold"&gt;lists.asmx &lt;/SPAN&gt;web service. This web service has a web method called &lt;SPAN style="FONT-WEIGHT: bold"&gt;GetListItems &lt;/SPAN&gt;that can retrieve all meta data for one or more list items (as described in an &lt;A href="http://weblogs.asp.net/jan/archive/2009/05/06/querying-sharepoint-list-items-using-jquery.aspx" mce_href="http://weblogs.asp.net/jan/archive/2009/05/06/querying-sharepoint-list-items-using-jquery.aspx"&gt;earlier post&lt;/A&gt;). Once we have the meta data, the rendering of the ECB menu items is easy:&lt;/P&gt;
&lt;P style="FONT-FAMILY: courier new,courier"&gt;function Custom_AddListMenuItems(m, ctx) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var soapEnv = &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;lt;soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;soapenv:Body&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;listName&amp;gt;" + ctx.listName + "&amp;lt;/listName&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;viewFields&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ViewFields&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;FieldRef Name='Status' /&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ViewFields&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/viewFields&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;query&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Query&amp;gt;&amp;lt;Where&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Eq&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;FieldRef Name='ID' /&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Value Type='Integer'&amp;gt;" + currentItemID + "&amp;lt;/Value&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Eq&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Where&amp;gt;&amp;lt;/Query&amp;gt;\&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/query&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/GetListItems&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/soapenv:Body&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/soapenv:Envelope&amp;gt;";&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var wsurl = ctx.HttpRoot + "/_vti_bin/lists.asmx";&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $.ajax({&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; async: false,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url: wsurl,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type: "POST",&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataType: "xml",&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data: soapEnv,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; complete: function(xData, status) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var status = $(xData.responseXML).find("z\\:row:eq(0)").attr("ows_Status");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var menuItem = CASubM(m,"Update Status");&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var statusOptions = new Array("Not Started", "In Progress", &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Completed", "Deferred", "Waiting on someone else");&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(var i in statusOptions) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var statusOption = statusOptions[i];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(statusOption&amp;nbsp; != status)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAMOpt(menuItem, statusOption , &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "changeTaskStatus('" + wsurl + "','" + ctx.listName + "','" + &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; currentItemID + "','" + statusOption + "');");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; contentType: "text/xml; charset=\"utf-8\""&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAMSep(m);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return false;&lt;BR&gt;}&lt;/P&gt;
&lt;P&gt;First the SOAP Envelope to send to the &lt;SPAN style="FONT-WEIGHT: bold"&gt;GetListItems &lt;/SPAN&gt;web method is constructed (&lt;SPAN style="FONT-WEIGHT: bold"&gt;soapEnv &lt;/SPAN&gt;variable); it uses the &lt;SPAN style="FONT-WEIGHT: bold"&gt;listName &lt;/SPAN&gt;property of the &lt;SPAN style="FONT-WEIGHT: bold"&gt;ctx &lt;/SPAN&gt;object (defined by SharePoint in the init.js), and the &lt;SPAN style="FONT-WEIGHT: bold"&gt;currentItemID &lt;/SPAN&gt;(defined by SharePoint in the core.js). The &lt;A href="http://jquery.com/" mce_href="http://jquery.com"&gt;jQuery&lt;/A&gt; &lt;SPAN style="FONT-WEIGHT: bold"&gt;ajax &lt;/SPAN&gt;method is used to make a the web service call. When the data is retrieved (the &lt;SPAN style="FONT-WEIGHT: bold"&gt;complete &lt;/SPAN&gt;option of the ajax method) the current &lt;SPAN style="FONT-WEIGHT: bold"&gt;Status &lt;/SPAN&gt;value is extracted and stored in the &lt;SPAN style="FONT-WEIGHT: bold"&gt;status &lt;/SPAN&gt;variable. Next a new menu item is added to the ECB using the &lt;SPAN style="FONT-WEIGHT: bold"&gt;CASubM &lt;/SPAN&gt;function (since this menu item will contain child items). Finally there is a loop over all possible Status values (stored in the &lt;SPAN style="FONT-WEIGHT: bold"&gt;statusOptions &lt;/SPAN&gt;array); every possible Status is added as a sub menu, except the Status that is currently assigned to the task item. Notice that the third parameter of the &lt;SPAN style="FONT-WEIGHT: bold"&gt;CAMOpt &lt;/SPAN&gt;function is a Javascript call to the &lt;SPAN style="FONT-WEIGHT: bold"&gt;changeTaskStatus &lt;/SPAN&gt;function, passing the web service URL, the list ID, the item ID and the selected status as parameters.&lt;/P&gt;
&lt;P&gt;The &lt;SPAN style="FONT-WEIGHT: bold"&gt;changeTaskStatus &lt;/SPAN&gt;function is pretty straight forward: once again a web service call is made, this time to the &lt;SPAN style="FONT-WEIGHT: bold"&gt;UpdateListItems &lt;/SPAN&gt;web method of the &lt;SPAN style="FONT-WEIGHT: bold"&gt;lists.asmx &lt;/SPAN&gt;web service. The SOAP Envelope sent to this web method contains a &lt;SPAN style="FONT-WEIGHT: bold"&gt;Batch &lt;/SPAN&gt;element in which an update is described of the Task list item.&lt;/P&gt;
&lt;P style="FONT-FAMILY: courier new,courier"&gt;function changeTaskStatus(wsurl, list, itemid, newstatus) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var batch =&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;lt;Batch OnError=\"Continue\"&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Method ID=\"1\" Cmd=\"Update\"&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Field Name=\"ID\"&amp;gt;" + itemid + "&amp;lt;/Field&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Field Name=\"Status\"&amp;gt;" + newstatus + "&amp;lt;/Field&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Method&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Batch&amp;gt;";&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var soapEnv =&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;lt;?xml version=\"1.0\" encoding=\"utf-8\"?&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;soap:Body&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;UpdateListItems xmlns=\"http://schemas.microsoft.com/sharepoint/soap/\"&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;listName&amp;gt;" + list + "&amp;lt;/listName&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;updates&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " + batch + "&amp;lt;/updates&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/UpdateListItems&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/soap:Body&amp;gt; \&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/soap:Envelope&amp;gt;";&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $.ajax({&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url: wsurl,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; beforeSend: function(xhr) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xhr.setRequestHeader("SOAPAction",&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "http://schemas.microsoft.com/sharepoint/soap/UpdateListItems");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type: "POST",&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataType: "xml",&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data: soapEnv,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; complete: function(xData, result) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.location.href=window.location.href;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; contentType: "text/xml; charset=utf-8"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR&gt;} &lt;/P&gt;
&lt;P&gt;When the web service call is done (the &lt;SPAN style="FONT-WEIGHT: bold"&gt;complete &lt;/SPAN&gt;option of the ajax method) the page is refreshed by setting the &lt;SPAN style="FONT-WEIGHT: bold"&gt;href &lt;/SPAN&gt;of the &lt;SPAN style="FONT-WEIGHT: bold"&gt;window.location &lt;/SPAN&gt;property to it’s current value. As a result the page will display the updated value of the Status.&lt;/P&gt;
&lt;P&gt;Although this is pretty cool, it’s a pity of course that everything is happening using client side Javascript; &lt;SPAN style="FONT-WEIGHT: bold"&gt;except updating the value of the Status column in the HTML page &lt;/SPAN&gt;(which done with a full page refresh). Let’s try to fix this! To get to the location in the HTML DOM where the Status of the Task item is displayed is quite complex due to how SharePoint generates the HTML for a List view. The &lt;SPAN style="FONT-WEIGHT: bold"&gt;getItemTD &lt;/SPAN&gt;function below will get a reference to the &lt;SPAN style="FONT-WEIGHT: bold"&gt;TD &lt;/SPAN&gt;element for a specific Task item. First of all this method selects a table element with the ID set to the combination of the list ID and view ID. Notice that this table ID needs to be escaped for jQuery to make the selection. Next the &lt;SPAN style="FONT-WEIGHT: bold"&gt;TR &lt;/SPAN&gt;element (row) is selected for the Task item, based on the ID of a table nested on the TR which is the same as the item ID. After that the &lt;SPAN style="FONT-WEIGHT: bold"&gt;header row &lt;/SPAN&gt;is selected so the &lt;SPAN style="FONT-WEIGHT: bold"&gt;index &lt;/SPAN&gt;of the Status column can be calculated. Using this index the correct TD element (table cell) is selected and returned.&lt;/P&gt;
&lt;P style="FONT-FAMILY: courier new,courier"&gt;function getItemTD(itemid) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var tableid = ctx.listName + "-" + ctx.view;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // escape the table id ({ and } should become \{ and \}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableid = tableid.replace(/{/g, "\\{").replace(/}/g, "\\}");&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // select them TR for the item&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $itemrow = $("#" + tableid + " table[id='" + itemid + "']").parent().parent();&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // select the header row&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $headerrow = $("&amp;gt;tr:eq(0)", $itemrow.parent());&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // select the table in the header row for the specified column&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $idtable = $("th&amp;gt;div&amp;gt;table[Name='Status']", $headerrow);&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // calculate the index of the column, based on the idtable&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var columnIndex =$("&amp;gt;th",$headerrow).index($idtable.parent().parent());&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // based on the index, let's get the TD&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return $("&amp;gt;td:eq(" + columnIndex + ")", $itemrow);&lt;BR&gt;} &lt;/P&gt;
&lt;P&gt;To make us of this function the complete option of the ajax function, used in the changeTaskStatus function, has to be changed:&lt;/P&gt;
&lt;P style="FONT-FAMILY: courier new,courier"&gt;...&lt;BR&gt;complete: function(xData, result) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; getItemTD(itemid).text(newstatus);&lt;BR&gt;},&lt;BR&gt;...&lt;/P&gt;
&lt;P&gt;The &lt;SPAN style="FONT-WEIGHT: bold"&gt;getItemTD &lt;/SPAN&gt;function is used to select the table cell which should be updated with the new value. The result is that now the Status of a Task item can be updated, both in the SharePoint database and the web UI, &lt;SPAN style="FONT-WEIGHT: bold"&gt;without full page postbacks!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;You can download the &lt;A href="http://bit.ly/1o0kGn" mce_href="http://bit.ly/1o0kGn"&gt;full source code of this sample over here&lt;/A&gt;. To use it, navigate to a &lt;SPAN style="FONT-WEIGHT: bold"&gt;default Task &lt;/SPAN&gt;list (e.g. http://yoursite/Lists/Tasks/AllItems.aspx) and add a &lt;SPAN style="FONT-WEIGHT: bold"&gt;Content Editor Web Part &lt;/SPAN&gt;to the page. Open the Tool Pane of the Content Editor Web Part and paste the downloaded script in the &lt;SPAN style="FONT-WEIGHT: bold"&gt;Source &lt;/SPAN&gt;property of the web part (detailed instructions to add the web part can be found &lt;A href="http://weblogs.asp.net/jan/archive/2009/09/03/customizing-the-sharepoint-ecb-with-javascript-part-1.aspx" mce_href="http://weblogs.asp.net/jan/archive/2009/09/03/customizing-the-sharepoint-ecb-with-javascript-part-1.aspx"&gt;over here&lt;/A&gt;). Notice that on top of the script a reference is made to the jQuery library hosted by Google. Once again, if you host the jQuery library yourself (e.g. in a Document Library), feel free to update the URL.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7200843" width="1" height="1"&gt;</content><author><name>jantie</name><uri>http://weblogs.asp.net/members/jantie.aspx</uri></author><category term="SharePoint" scheme="http://weblogs.asp.net/jan/archive/tags/SharePoint/default.aspx" /></entry><entry><title>URL Shortening in SharePoint with bit.ly</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jan/archive/2009/09/04/url-shortening-in-sharepoint-with-bit-ly.aspx" /><id>http://weblogs.asp.net/jan/archive/2009/09/04/url-shortening-in-sharepoint-with-bit-ly.aspx</id><published>2009-09-04T15:00:00Z</published><updated>2009-09-04T15:00:00Z</updated><content type="html">
&lt;p&gt;In my two &lt;a href="http://weblogs.asp.net/jan/archive/2009/09/03/customizing-the-sharepoint-ecb-with-javascript-part-1.aspx" mce_href="http://weblogs.asp.net/jan/archive/2009/09/03/customizing-the-sharepoint-ecb-with-javascript-part-1.aspx"&gt;previous posts&lt;/a&gt; about customizing the Edit Control Block (or ECB for short) with Javascript, I showed some basic examples of what can be accomplished with this technique. Now it’s time to build a real life example instead of menu items which show Hello World dialog boxes.&lt;/p&gt;

&lt;p&gt;I’m pretty sure everybody who is using SharePoint has sent a link to a document in a Document Library to somebody else (in an email message for example). So you probably know that links to documents (or list items) can become pretty long if the document is located in a Document Library on a site deeply buried in a hierarchy. Already some time ago the internet community has solved the issue of long URL’s (which were a pain in newsgroups for example, or too long for Twitter messages): URL shortening. The idea is pretty basic: you can request a short URL (typically containing a generated code) for a long URL. When somebody uses the short URL, the long URL is retrieved and the user is redirected. There are many sites on the internet that provide this service for free, in this article I will be using &lt;a href="http://bit.ly" mce_href="http://bit.ly"&gt;bit.ly&lt;/a&gt; because they have a pretty nice API you can work with as a developer. For example this link &lt;a href="http://bit.ly/1btOBN"&gt;http://bit.ly/1btOBN&lt;/a&gt; will navigate to &lt;a href="http://weblogs.asp.net/jan/archive/2009/09/04/customizing-the-sharepoint-ecb-with-javascript-part-2.aspx"&gt;http://weblogs.asp.net/jan/archive/2009/09/04/customizing-the-sharepoint-ecb-with-javascript-part-2.aspx&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So what’s the idea? Instead of having to copy the link of a SharePoint document or list item to the clipboard, navigate to bit.ly and request a short URL over there; we’ll build this functionality directly into the SharePoint web user interface. The screenshot below shows the ECB of a normal Document Library, as you can see there is an extra menu item Shorten Link with bit.ly that has three child menu items.&lt;/p&gt;

&lt;p mce_keep="true"&gt;&lt;img src="http://storage.tielens.name/sharepointbitly1.jpg" mce_src="http://storage.tielens.name/sharepointbitly1.jpg"&gt;&lt;/p&gt;

&lt;p&gt;Once again, in my previous post I go into the details about how you can build a nested ECB menu item by just using Javascript. So let’s quickly discuss the code to build the menu items:&lt;br&gt;&lt;br&gt;&lt;font face="courier new,courier"&gt;function Custom_AddDocLibMenuItems(m, ctx) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var itemLink = window.location.protocol + "//" + window.location.host + &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GetAttributeFromItemTable(itemTable, "Url", "ServerUrl");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return addBitlyMenuItems(m, ctx, itemLink);&lt;br&gt;}&lt;br&gt;&lt;br&gt;function Custom_AddListMenuItems(m, ctx) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var itemLink = window.location.protocol + "//" + window.location.host + &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.displayFormUrl + "?ID=" + currentItemID;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return addBitlyMenuItems(m, ctx, itemLink);&lt;br&gt;}&lt;br&gt;&lt;br&gt;function addBitlyMenuItems(m, ctx, url) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var shortenMenu = CASubM(m,"Shorten Link with bit.ly", "/_layouts/images/RAT16.GIF");&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAMOpt(shortenMenu, "Shorten and Display", "getShortUrl('" + &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url + "', shortenAndDisplay)", "");&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAMOpt(shortenMenu, "Shorten and Copy to Clipboard", &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "getShortUrl('" + url + "', shortenAndCopy)");&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAMSep(shortenMenu);&amp;nbsp; // separator&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAMOpt(shortenMenu, "Show Statistics for Short Link", &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "getShortUrl('" + url + "', shortenAndShowStats)", "/_layouts/images/GRA16.GIF");&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAMSep(m); // separator&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return false;&lt;br&gt;}&lt;br&gt;&lt;/font&gt;&lt;br&gt;Because I want to show the ECB menu item both in Lists and Document Libraries, I’ve implemented both the &lt;b&gt;Custom_AddDocLibMenuItems &lt;/b&gt;and &lt;b&gt;Custom_AddListMenuItems &lt;/b&gt;Javascript functions. In those functions a string is constructed that contains a link to either the list item or to the document. Once we’ve got that URL, the &lt;b&gt;addBitlyMenuItems &lt;/b&gt;function is called. This function will build the parent menu item in the ECB and the three child menu items which will actually do the actions. Every action menu item calls a custom Javascript function called &lt;b&gt;getShortUrl &lt;/b&gt;which has a parameter for the long URL and a callback function. The getShortUrl function builds an URL to call the bit.ly REST API. This URL is called with the help of the &lt;a href="http://jquery.com" mce_href="http://jquery.com"&gt;jQuery&lt;/a&gt; &lt;b&gt;getJSON&lt;/b&gt; function. Note that to make use of the bit.ly API you need to have a free account and a corresponding key.&lt;br&gt;&lt;br&gt;&lt;font face="courier new,courier"&gt;function getShortUrl(url, callback) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var bitlyURL = "http://api.bit.ly/shorten?"&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + "version=2.0.1"&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + "&amp;amp;longUrl=" + escape(url)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + "&amp;amp;login=YOUR_LOGIN" + &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + "&amp;amp;apiKey=YOUR_KEY" + &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + "&amp;amp;history=1" + &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + "&amp;amp;format=json&amp;amp;callback=?";&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $.getJSON(bitlyURL, function(data){&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; callback(data.results[url].shortUrl);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br&gt;}&lt;br&gt;&lt;/font&gt;&lt;br&gt;Once the &lt;b&gt;getJSON&lt;/b&gt; function receives the data from bit.ly, the callback function (which was passed as a parameter) is called, passing along the shortened URL.&lt;/p&gt;

&lt;p&gt;The three callback functions used in the &lt;b&gt;addBitlyMenuItems &lt;/b&gt;function, will each do a specific action: show the shortened link, copy the link to the clipboard or navigate to the bit.ly statistics page. The &lt;b&gt;shortenAndDisplay &lt;/b&gt;is the most complex of those three; this function will display the shortened URL in a &lt;b&gt;DIV &lt;/b&gt;centered on top of the page. Once again jQuery is used&amp;nbsp;for manipulating the HTML DOM to dynamically render the DIV.&lt;br&gt;&lt;br&gt;&lt;font face="courier new,courier"&gt;function shortenAndDisplay(url) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $("body").append("&amp;lt;div id='shortUrlDiv' class='ms-vb' style='position:absolute; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color:White; padding:10px; border-width:1px; border-style:solid; \&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-color:Black;display:none; position:absolute;'&amp;gt;URL shortened to:&amp;lt;h2&amp;gt;" + &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url + "&amp;lt;/h2&amp;gt;&amp;lt;a href='#' id='shortUrlDivClose'&amp;gt;Close&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;");&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var $shortUrlDiv = $("#shortUrlDiv");&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var topPos = (document.body.clientHeight - $shortUrlDiv.height()) / 2;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var leftPos = (document.body.clientWidth - $shortUrlDiv.width()) / 2;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $("#shortUrlDivClose", $shortUrlDiv).click(function() { &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(this).parent().hide("fast", function() { $(this).remove(); });&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $("#shortUrlDiv").css("top", topPos).css("left", leftPos).show("fast");&lt;br&gt;}&lt;/font&gt;&lt;br&gt;&lt;br&gt;The result of this function looks like this:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://storage.tielens.name/sharepointbitly2.jpg" mce_src="http://storage.tielens.name/sharepointbitly2.jpg"&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;The other two callback functions are very easy to implement. Notice that to show the bit.ly statistics page for a shortened link, you just need to add a &lt;b&gt;+&lt;/b&gt; sign to that link.&lt;/p&gt;

&lt;p&gt;&lt;font face="courier new,courier"&gt;function shortenAndCopy(url) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; clipboardData.setData("Text", url);&lt;br&gt;}&lt;br&gt;function shortenAndShowStats(url) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.location = url + "+";&lt;br&gt;}&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;The complete source code &lt;a href="http://storage.tielens.name/SharePointShortUrlsCode.zip" mce_href="http://storage.tielens.name/SharePointShortUrlsCode.zip"&gt;can be downloaded from here&lt;/a&gt;. You will notice that I’ve made the code somewhat easier to configure by adding a configuration variable at the top:&lt;/p&gt;

&lt;p&gt;&lt;font face="courier new,courier"&gt;var shortenConfig = {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; debug: 0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // set this value to 1 to see debug information&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; bitlyLogin: "spdemo",&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // bit.ly account, below API key&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; bitlyAPIKey:"R_877718dd86f418d0ee840c08af717a68",&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; bitlyHistory: 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // set this value to 1 to add to bit.ly history&lt;br&gt;};&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;When you set the debug variable to 1, another DIV is dynamically added to the page and will show some log messages. When the bitlyHistory variable is set to 1, bit.ly will add the shortened link to the bit.ly account (so you can track it). Once again, if you plan to use this, go to bit.ly and sign up to get your own login and API key. On top of my code there is a reference to the jQuery library hosted by Google. If you have deployed jQuery locally, feel free to change the script reference. To use the code, just navigate to a Document Library or List, and add a new Content Editor web part to that page. As the HTML source of the web part, copy and paste the entire code that you've downloaded. (For a detailed description how to add the Content Editor web part, check &lt;a href="http://weblogs.asp.net/jan/archive/2009/09/03/customizing-the-sharepoint-ecb-with-javascript-part-1.aspx" mce_href="http://weblogs.asp.net/jan/archive/2009/09/03/customizing-the-sharepoint-ecb-with-javascript-part-1.aspx"&gt;an earlier article&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;
&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8225007787151720";
/* 728x15, created 9/9/09 */
google_ad_slot = "1938052596";
google_ad_width = 728;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"&gt;
&lt;/script&gt;
&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7191779" width="1" height="1"&gt;</content><author><name>jantie</name><uri>http://weblogs.asp.net/members/jantie.aspx</uri></author><category term="SharePoint" scheme="http://weblogs.asp.net/jan/archive/tags/SharePoint/default.aspx" /></entry><entry><title>Customizing the SharePoint ECB with Javascript, Part 2</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jan/archive/2009/09/04/customizing-the-sharepoint-ecb-with-javascript-part-2.aspx" /><id>http://weblogs.asp.net/jan/archive/2009/09/04/customizing-the-sharepoint-ecb-with-javascript-part-2.aspx</id><published>2009-09-04T04:15:00Z</published><updated>2009-09-04T04:15:00Z</updated><content type="html">&lt;p&gt;Other articles in this series:&lt;br&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://weblogs.asp.net/jan/archive/2009/09/03/customizing-the-sharepoint-ecb-with-javascript-part-1.aspx" mce_href="http://weblogs.asp.net/jan/archive/2009/09/03/customizing-the-sharepoint-ecb-with-javascript-part-1.aspx"&gt;Customizing the SharePoint ECB with Javascript, Part 1&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://weblogs.asp.net/jan/archive/2009/09/11/customizing-the-sharepoint-ecb-with-javascript-part-3.aspx" mce_href="http://weblogs.asp.net/jan/archive/2009/09/11/customizing-the-sharepoint-ecb-with-javascript-part-3.aspx"&gt;Customizing the SharePoint ECB with Javascript, Part 3&lt;/a&gt;&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br&gt;In the &lt;a href="http://weblogs.asp.net/jan/archive/2009/09/03/customizing-the-sharepoint-ecb-with-javascript-part-1.aspx" mce_href="http://weblogs.asp.net/jan/archive/2009/09/03/customizing-the-sharepoint-ecb-with-javascript-part-1.aspx"&gt;previous article in this series&lt;/a&gt; I explained how to add menu items in the &lt;b&gt;Edit Control Block&lt;/b&gt; of Lists and Document Libraries. The menu items added so far are all displayed at the same level; directly in the ECB. It is possible however to build hierarchical menus (menu items with sub menu items) using this technique as well. A good example of a hierarchical menu in the ECB is the default &lt;b&gt;Send To&lt;/b&gt; menu:&lt;/p&gt;&lt;p&gt;&lt;img src="http://storage.tielens.name/ecbjavascript2_1.jpg" mce_src="http://storage.tielens.name/ecbjavascript2_1.jpg"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Actually this is very easy to accomplish, instead of the &lt;b&gt;CAMOpt&lt;/b&gt; Javascript function discussed in the previous post, the function &lt;b&gt;CASubM&lt;/b&gt; can be used to create fly-out menu items (the ‘parent’ menu items). The following code snippet makes use of this technique:&lt;/p&gt;&lt;p&gt;&lt;font face="courier new,courier"&gt;function Custom_AddListMenuItems(m, ctx) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var menuItem = CASubM(m,"Menu Item", "/_layouts/images/LWV16.GIF")&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAMOpt(menuItem, "Sub Menu Item 1", "alert('Hello World!');");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAMOpt(menuItem, "Sub Menu Item 2", "alert('Hello World!');");&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var subMenuItem = CASubM(menuItem,"Sub Menu Item 3")&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAMOpt(subMenuItem, "Sub Menu Item 4", "alert('Hello World!');");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAMOpt(subMenuItem, "Sub Menu Item 5", "alert('Hello World!');");&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAMSep(m); // separator&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return false; // render the default menu items too&lt;br&gt;}&lt;/font&gt;&lt;/p&gt;&lt;p&gt;When this code is dropped in a Content Editor web part on a List page for example (see the previous article for the steps to follow), the rendered ECB will have the &lt;b&gt;Menu Item &lt;/b&gt;at the first level. This item contains three child menu items; the third child on itself contains two additional child menu items.&lt;/p&gt;&lt;p&gt;&lt;img src="http://storage.tielens.name/ecbjavascript2_2.jpg" mce_src="http://storage.tielens.name/ecbjavascript2_2.jpg"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;As already mentioned the key to this technique is the &lt;b&gt;CASubM &lt;/b&gt;Javascript function. The return value is a reference to the menu item that is created; it is this instance that is used as a parameter of the &lt;b&gt;CAMOpt &lt;/b&gt;function to specify on which level the menu item should be created. The &lt;b&gt;CASubM &lt;/b&gt;function can have 6 parameters (the first two are required):&lt;/p&gt;&lt;ol&gt;&lt;li&gt;a reference to the parent menu (just like the CAMOpt function)&lt;/li&gt;&lt;li&gt;the text to display&lt;/li&gt;&lt;li&gt;the URL of an icon for the menu item&lt;/li&gt;&lt;li&gt;the HTML alt attribute value of the icon&lt;/li&gt;&lt;li&gt;the HTML sequence attribute value of the menu item&lt;/li&gt;&lt;li&gt;the HTML description attribute value of the icon&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;The code discussed above is a basic sample that does nothing more than displaying a &lt;b&gt;Hello World &lt;/b&gt;message box when one of the list items is clicked. In real life you probably want to do something interesting when the user clicks on an ECB menu item; let’s try to create the following ECB:&lt;/p&gt;&lt;p&gt;&lt;img src="http://storage.tielens.name/ecbjavascript2_3.jpg" mce_src="http://storage.tielens.name/ecbjavascript2_3.jpg"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The code to render the Open in New Window menu item, including the sub menu items, goes as follows:&lt;/p&gt;&lt;p&gt;&lt;font face="courier new,courier"&gt;function Custom_AddListMenuItems(m, ctx) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var openMenu = CASubM(m,"Open in New Window");&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAMOpt(openMenu, "View Item", "alert('Todo');");&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAMOpt(openMenu, "Edit Item", &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "alert('Todo');", "/_layouts/images/edititem.gif");&lt;br&gt;&amp;nbsp; &amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return false; // render the default menu items too&lt;br&gt;}&lt;/font&gt;&lt;/p&gt;&lt;p&gt;So far nothing new or exciting, the challenge however is to come up with the Javascript functions which will be called when the &lt;b&gt;View Item &lt;/b&gt;or &lt;b&gt;Edit Item &lt;/b&gt;sub menu items are clicked (now they just display a dialog box). The issue (or challenge) is that the Javascript function needs to now for which item in the List or Document Library the ECB is rendered. Once again the &lt;b&gt;core.js &lt;/b&gt;is helping us out; it contains code that populates some context information about these items. There is for example a variable in the core.js called &lt;b&gt;currentItemID &lt;/b&gt;which contains the ID of&amp;nbsp; the List item or Document for which the ECB is being rendered. Some other interesting variables at the same location are: &lt;b&gt;currentItemIcon&lt;/b&gt;, &lt;b&gt;currentItemFileUrl&lt;/b&gt;, &lt;b&gt;currentItemCheckedOutUserId&lt;/b&gt; and &lt;b&gt;currentItemModerationStatus&lt;/b&gt;. For a full list, just open the &lt;b&gt;core.js&lt;/b&gt; file in the \12 hive and you’ll see all of them at the top. Besides those variables there is also an object called &lt;b&gt;ctx&lt;/b&gt; with even more information about the List or Document Library itself. The &lt;b&gt;ctx&lt;/b&gt; object is defined in the &lt;b&gt;init.js&lt;/b&gt;, and has properties like &lt;b&gt;listName&lt;/b&gt;, &lt;b&gt;view&lt;/b&gt;, &lt;b&gt;displayFormUrl&lt;/b&gt; etc. So if we adopt the code to build some URL’s which will be opened in a new window, the work is done.&lt;/p&gt;&lt;p&gt;&lt;font face="courier new,courier"&gt;function Custom_AddListMenuItems(m, ctx) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var viewURL = window.location.protocol + "//" + window.location.host + &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.displayFormUrl + "?ID=" + currentItemID;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var editURL = window.location.protocol + "//" + window.location.host + &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.editFormUrl + "?ID=" + currentItemID;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var openMenu = CASubM(m,"Open in New Window");&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAMOpt(openMenu, "View Item", "window.open('" + viewURL + "');");&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAMOpt(openMenu, "Edit Item", &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "window.open('" + editURL + "');", "/_layouts/images/edititem.gif");&lt;br&gt;&amp;nbsp; &amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return false; // render the default menu items too&lt;br&gt;}&lt;/font&gt;&lt;/p&gt;&lt;p&gt;Using the variables found in the core.js and init.js files, you have access to the most basic set of metadata. But quite often it’s necessary to have access to even more metadata like non default fields etc. In the next article in this series, I’ll show you how this can be accomplished.&lt;br&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7191520" width="1" height="1"&gt;</content><author><name>jantie</name><uri>http://weblogs.asp.net/members/jantie.aspx</uri></author><category term="SharePoint" scheme="http://weblogs.asp.net/jan/archive/tags/SharePoint/default.aspx" /></entry><entry><title> Customizing the SharePoint ECB with Javascript, Part 1</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jan/archive/2009/09/03/customizing-the-sharepoint-ecb-with-javascript-part-1.aspx" /><id>http://weblogs.asp.net/jan/archive/2009/09/03/customizing-the-sharepoint-ecb-with-javascript-part-1.aspx</id><published>2009-09-03T13:18:00Z</published><updated>2009-09-03T13:18:00Z</updated><content type="html">&lt;p&gt;Other articles in this series:&lt;br&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://weblogs.asp.net/jan/archive/2009/09/04/customizing-the-sharepoint-ecb-with-javascript-part-2.aspx" mce_href="http://weblogs.asp.net/jan/archive/2009/09/04/customizing-the-sharepoint-ecb-with-javascript-part-2.aspx"&gt;Customizing the SharePoint ECB with Javascript, Part 2&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://weblogs.asp.net/jan/archive/2009/09/11/customizing-the-sharepoint-ecb-with-javascript-part-3.aspx" mce_href="http://weblogs.asp.net/jan/archive/2009/09/11/customizing-the-sharepoint-ecb-with-javascript-part-3.aspx"&gt;Customizing the SharePoint ECB with Javascript, Part 3&lt;/a&gt; &lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;First of all; what is the &lt;b&gt;ECB&lt;/b&gt; in SharePoint? Well ECB stands for &lt;b&gt;E&lt;/b&gt;dit &lt;b&gt;C&lt;/b&gt;ontrol &lt;b&gt;B&lt;/b&gt;lock and it is the context menu that is displayed for all items in SharePoint Lists and Document Libraries (and their corresponding web parts). The menu items shown below are the default ones that you get out-of-the-box, in this case in a List.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img src="http://storage.tielens.name/ecbjavascript1.jpg" mce_src="http://storage.tielens.name/ecbjavascript1.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Probably the most commonly used technique to customize the ECB is by making use of a &lt;b&gt;Feature &lt;/b&gt;that contains a &lt;b&gt;CustomAction &lt;/b&gt;element, as displayed below:&lt;/p&gt;
&lt;p&gt;&lt;font face="courier new,courier"&gt;&amp;lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;CustomAction&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Id="{B0B5A0CB-7FBE-4dd6-9B2A-2B1E1321B8F9}"&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RegistrationType="List"&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RegistrationId="101"&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Location="EditControlBlock"&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Title="Dummy Menu Item"&amp;gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;UrlAction&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Url="/_layouts/dummy.aspx"/&amp;gt;&amp;nbsp; &amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/CustomAction&amp;gt;&lt;br&gt;&amp;lt;/Elements&amp;gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;By using the &lt;b&gt;EditControlBlock &lt;/b&gt;value for the &lt;b&gt;Location &lt;/b&gt;attribute, the &lt;b&gt;Dummy Menu Item&lt;/b&gt; is added to the ECB in all the Document Libraries (the &lt;b&gt;RegistrationId &lt;/b&gt;attribute value of &lt;b&gt;101&lt;/b&gt;). This technique works of course, but there are some limitations related to it. First of all when a menu item is added to the ECB by using a CustomAction element, the menu item is displayed in all ECB menus; there is no way to make the menu item context sensitive. It could be for example that you only want to show the menu item for some of the documents, not all of them. The out-of-the-box Check In/Out behaviour is a good example of this: Check In is only displayed when the document is in the Checked Out state and visa versa. A second limitation is that using this technique, it’s not possible to create nested menu items, like the out-of-the-box Send To ECB menu item for example. The underlying reason is that unfortunately it is not possible to use the &lt;b&gt;ControlAssembly&lt;/b&gt; and &lt;b&gt;ControlClass&lt;/b&gt; attributes in the &lt;b&gt;CustomAction&lt;/b&gt; element of a feature, when the location is &lt;b&gt;EditControlBlock&lt;/b&gt;. When using the ControlAssembly and ControlClass attributes you can basically point to a server control that's responsible for rendering the UI to show as the Custom Action in the ECB. More information and an example can be found in one of my previous posts &lt;a href="http://weblogs.asp.net/jan/archive/2008/05/08/creating-hierarchical-menus-with-a-customaction-in-sharepoint.aspx" mce_href="http://weblogs.asp.net/jan/archive/2008/05/08/creating-hierarchical-menus-with-a-customaction-in-sharepoint.aspx"&gt;Creating Hierarchical Menus with a Custom Action&lt;/a&gt;. But once again, this &lt;b&gt;will not work&lt;/b&gt; in the ECB!&lt;br&gt;&lt;/p&gt;
&lt;p&gt;Luckily there is another technique to customize the ECB that solves these issues, this technique is using Javascript. The key functionality to build custom ECB menu items is pretty easy since SharePoint already contains some wrapper Javascript functions to do this. In the &lt;b&gt;core.js&lt;/b&gt; file (which can be found in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033) you can find the methods &lt;b&gt;AddListMenuItems &lt;/b&gt;and &lt;b&gt;AddDocLibMenuItems&lt;/b&gt;. These methods are called by SharePoint when an ECB should be built for a List item or Document. Although technically it is possible to modify those functions directly in the core.js, &lt;b&gt;it is not supported&lt;/b&gt;. There is a much nicer mechanism available to accomplish this! The first lines of code you can find in the &lt;b&gt;AddListMenuItems&lt;/b&gt; function look like this (the &lt;b&gt;AddDocLibMenuItems &lt;/b&gt;function contains similar code):&lt;/p&gt;
&lt;p&gt;&lt;font face="courier new,courier"&gt;if (typeof(Custom_AddListMenuItems) !="undefined")&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (Custom_AddListMenuItems(m, ctx))&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return;&lt;br&gt;}&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Basically the Javascript function verifies if there is a function known called &lt;b&gt;Custom_AddListMenuItems&lt;/b&gt;, if so this function is called. The return value of this function (true or false) determines if the rest of the AddListMenuItems function is executed; thus if the default menu items are added or not. Out-of-the-box there is no function called Custom_AddListMenuItems, the goal is that you build on yourself. Once again you can define this function directly in the core.js file, but this is unsupported. The nice thing is that this function can be defined in other .js files or even directly in SharePoint pages. Before we do that, let’s find out the code to implement a custom Custom_AddListMenuItems function:&lt;/p&gt;
&lt;p&gt;&lt;font face="courier new,courier"&gt;function Custom_AddListMenuItems(m, ctx) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAMOpt(m, "Dummy link", "alert('Hello World!');", "/_layouts/images/LWV16.GIF");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAMSep(m);&lt;br&gt;}&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;The first line calls the &lt;b&gt;CAMOpt &lt;/b&gt;function (which is available in the core.js as well) to create a new menu item. As you can verify in the core.js, the CAMOpt function &lt;b&gt;can&lt;/b&gt; have seven parameters (the first three are required):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;a reference to an ECB, typically passed by the caller of Custom_AddListMenuItems&lt;/li&gt;
&lt;li&gt;the text to display&lt;/li&gt;
&lt;li&gt;the Javascript function to execute, in this sample a basic Hello World dialog is shown&lt;/li&gt;
&lt;li&gt;the URL of an icon for the menu item&lt;/li&gt;
&lt;li&gt;the HTML alt attribute value of the icon&lt;/li&gt;
&lt;li&gt;the HTML description attribute value of the icon&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;On the second line the &lt;b&gt;CAMSep &lt;/b&gt;function is called which renders a separator (a thin line). &lt;/p&gt;
&lt;p&gt;The easiest way to test this code is to navigate to a SharePoint list, for example a Task list (e.g. http://yoursite/Lists/Tasks/AllItems.aspx). In the &lt;b&gt;Site Actions &lt;/b&gt;menu of that page choose &lt;b&gt;Edit Page&lt;/b&gt;. Notice that this page is having one Web Part Zone called &lt;b&gt;Main&lt;/b&gt;, which already displays one web part. Add a new &lt;b&gt;Content Editor&lt;/b&gt; web part to the &lt;b&gt;Main&lt;/b&gt; zone; and choose &lt;b&gt;Modify Shared Web Part&lt;/b&gt; from the Edit menu of the newly added web part (top right). In the properties task pane of the web part, click on the &lt;b&gt;Source Editor &lt;/b&gt;button and copy/paste the entire &lt;b&gt;AddListMenuItems &lt;/b&gt;function. When the page is reloaded, the result should look like this: &lt;/p&gt;
&lt;p&gt;&lt;img src="http://storage.tielens.name/ecbjavascript2.jpg" mce_src="http://storage.tielens.name/ecbjavascript2.jpg"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When the new Dummy link menu item is clicked; a simple dialog box will be shown.&lt;br&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;This is the first part of a series of posts which will show you how to customize the Edit Control Block by using Javascript. In the next post I’ll show you how you can create nested (or hierarchical) menu’s in the ECB.&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;Update: I added a few lines which explicitly specify that the ControlClass and ControlAssembly attributes will not work in the ECB. Thanks Wouter for mentioning this!&lt;/i&gt;&lt;br&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7190543" width="1" height="1"&gt;</content><author><name>jantie</name><uri>http://weblogs.asp.net/members/jantie.aspx</uri></author><category term="SharePoint" scheme="http://weblogs.asp.net/jan/archive/tags/SharePoint/default.aspx" /></entry><entry><title>SharePoint 2010 Sneak Peak</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jan/archive/2009/07/13/sharepoint-2010-sneak-peak.aspx" /><id>http://weblogs.asp.net/jan/archive/2009/07/13/sharepoint-2010-sneak-peak.aspx</id><published>2009-07-13T14:44:00Z</published><updated>2009-07-13T14:44:00Z</updated><content type="html">&lt;P mce_keep="true"&gt;I guess this will be blogged extensivly the coming hours and days: Microsoft has released official documentation about the next version of SharePoint. Read all about it here: &lt;A href="http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/default.aspx" mce_href="http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/default.aspx"&gt;http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/default.aspx&lt;/A&gt;. From that site:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;&lt;A href="http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/Overview-Video.aspx" mce_href="http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/Overview-Video.aspx"&gt;General overview&lt;/A&gt;&lt;BR&gt;SharePoint 2010 enables organizations to connect and empower people through an integrated set of rich features. Get a sneak peek of SharePoint 2010 product features today.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;&lt;A href="http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/IT-Pro-video.aspx" mce_href="http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/IT-Pro-video.aspx"&gt;For IT Professionals&lt;/A&gt;&lt;BR&gt;
&lt;DIV id=IT-professional-control-content class=control-content&gt;
&lt;DIV style="DISPLAY: inline" id=ctl00_PlaceHolderMain_MSCOM2010ContentRichHtmlField2__ControlWrapper_RichHtmlField&gt;For IT professionals, SharePoint 2010 offers enhancement to drive productivity, scalable unified infrastructure, and flexible deployment. Learn more about how to cut IT costs with SharePoint 2010.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;
&lt;DIV class=control-content&gt;
&lt;DIV style="DISPLAY: inline"&gt;&lt;A href="http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/Developer-video.aspx" mce_href="http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/Developer-video.aspx"&gt;For Developers&lt;/A&gt; &lt;STRONG&gt;YAY!&lt;/STRONG&gt;&lt;BR&gt;For developers, SharePoint 2010 provides the business collaboration platform to rapidly build solutions and respond to business needs. Check out SharePoint 2010 features sneak peek for developers.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7146587" width="1" height="1"&gt;</content><author><name>jantie</name><uri>http://weblogs.asp.net/members/jantie.aspx</uri></author><category term="SharePoint" scheme="http://weblogs.asp.net/jan/archive/tags/SharePoint/default.aspx" /></entry><entry><title>SharePoint Search-as-You-Type with jQuery</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jan/archive/2009/07/02/sharepoint-search-as-you-type-with-jquery.aspx" /><id>http://weblogs.asp.net/jan/archive/2009/07/02/sharepoint-search-as-you-type-with-jquery.aspx</id><published>2009-07-02T04:18:00Z</published><updated>2009-07-02T04:18:00Z</updated><content type="html">&lt;p&gt;Already since a long time I’ve been thinking about a web part that would search-as-you-type using SharePoint’s search engine. The idea behind this concept is that while you’re typing a query in the search box, asynchronously the query is already executed and the results are being displayed. Every time the query is changed, the results will be updated dynamically. This will allow users to see the results without going to the Search Results page, and even more: they don’t have to go back to alter their query. In such a scenario you want to avoid full page postbacks of course, so AJAX-techniques have to be used to accomplish this. A while back my first approach would be to make use of &lt;a href="http://ajax.asp.net" mce_href="http://ajax.asp.net"&gt;ASP.NET AJAX&lt;/a&gt; to build the necessary functionality in a web part for example. But during the last couple of weeks I’ve become a really big fan of using &lt;a href="http://jquery.com" mce_href="http://jquery.com"&gt;jQuery&lt;/a&gt; Javascript Library in SharePoint sites, and it happens to be that the search-as-you-type functionality can be created with the help of jQuery very easily. The beauty of this solution is that everything is happening on the client (in the web browser), so there is absolutely no requirement to deploy something to the server (nowadays this seems to be called ‘Assembly Free’).&lt;/p&gt;&lt;p&gt;Before you get too excited; it’s quite obvious that when you use this sample on a production server with lots of users, the SharePoint Search component can be hammered with lots of requests (which can be bad for the performance). So use it wisely! To minimize the impact on the performance of the server, the code will only execute a search query when (by default) three characters are entered, and while the user is still typing no queries are executed at all (there’s a configurable delay).&lt;/p&gt;&lt;p&gt;So how is all of this implemented? Well the idea is to display an HTML textbox in a Content Editor Web Part. Using the jQuery library, an eventhandler is added to that textbox for every keypress. When there are more than three characters (value is configurable) entered in the textbox, jQuery will make an asynchronous call to the Search web services (/_layouts/search.asmx). The resulting found items are displayed in an HTML div element which is positioned right below the textbox, on top of all other HTML elements. The user can select a result using the arrow keys, or by hovering the mouse over a result. When a result is selected by pressing the enter key or by clicking on it, the user is redirected to the corresponding page or document. You can see the code working in a web part in the following animated screenshot.&lt;/p&gt;&lt;p&gt;&lt;img src="http://storage.tielens.name/SharePointQuickSearchWebPartDemo.gif" mce_src="http://storage.tielens.name/SharePointQuickSearchWebPartDemo.gif"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If you want to try this out yourself, just follow these steps. Once again, there is absolutely nothing you need to tweak and/or deploy on your server. You can do all of this through the web user interface of SharePoint.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Download the &lt;a href="http://storage.tielens.name/SharePointQuickSearchWebPartCode.zip" mce_href="http://storage.tielens.name/SharePointQuickSearchWebPartCode.zip"&gt;code file here&lt;/a&gt;.&lt;br&gt;&lt;/li&gt;&lt;li&gt;Add a new &lt;b&gt;Content Editor Web Part&lt;/b&gt;, which is available in SharePoint out-of-the-box, to a page.&lt;/li&gt;&lt;li&gt;Modify the newly added web part, use the &lt;b&gt;Source Editor&lt;/b&gt; button in the properties task pane to add the downloaded code.&lt;/li&gt;&lt;li&gt;Optionally you can give the web part a meaningful &lt;b&gt;Title &lt;/b&gt;in the &lt;b&gt;Appearance &lt;/b&gt;group (e.g. &lt;b&gt;Quick Search&lt;/b&gt;).&lt;br&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;When you check out the code, notice that the first line is a reference to the jQuery library, hosted on Google’s servers. If you plan to use this in production, I’d recommend you to host the jQuery library in your own environment so you have to update the reference with your own URL.&lt;/p&gt;&lt;p&gt;[Update July 3th 2009] If you are using a &lt;b&gt;non-English &lt;/b&gt;version of SharePoint, you need to change the script because by default the &lt;b&gt;All Sites&lt;/b&gt; Search Scope is being used. On top of the script look for the &lt;b&gt;quickSearchConfig &lt;/b&gt;variable and set the &lt;b&gt;scope &lt;/b&gt;appropriately (you can look up the name of your Search Scopes in Central Admin/SSP). Also notice that currently using WSS is not supported (the MOSS Search Engine is used)!&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="courier new,courier"&gt;var quickSearchConfig = {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay: 500,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; minCharacters: 3,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&lt;font color="#ff0000"&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; scope: "All Sites",&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&lt;/font&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; numberOfResults: 15,&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; resultsAnimation: 200, &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; resultAnimation: 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;}; &lt;/font&gt;&lt;br&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7138579" width="1" height="1"&gt;</content><author><name>jantie</name><uri>http://weblogs.asp.net/members/jantie.aspx</uri></author><category term="SharePoint" scheme="http://weblogs.asp.net/jan/archive/tags/SharePoint/default.aspx" /><category term="jQuery" scheme="http://weblogs.asp.net/jan/archive/tags/jQuery/default.aspx" /></entry><entry><title>My SharePoint Sessions at the Dutch DevDays</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jan/archive/2009/05/26/my-sharepoint-sessions-at-the-dutch-devdays.aspx" /><id>http://weblogs.asp.net/jan/archive/2009/05/26/my-sharepoint-sessions-at-the-dutch-devdays.aspx</id><published>2009-05-26T05:02:00Z</published><updated>2009-05-26T05:02:00Z</updated><content type="html">&lt;p&gt;Later on this week, on Friday May 29th, I will be presenting two sessions at the &lt;a href="http://www.devdays.nl" mce_href="http://www.devdays.nl"&gt;Developer Days in The Hague&lt;/a&gt; (The Netherlands). I'm pretty excited to be there, not only because it's always lots of fun to speak at this event; but there's lots of cool SharePoint 2007 stuff (IMHO) packed in my presentations:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Getting Started with .NET 3.5 in SharePoint (&lt;a href="http://www.devdays.nl/Sessies/Detail.aspx?code=OFF03JT" mce_href="http://www.devdays.nl/Sessies/Detail.aspx?code=OFF03JT"&gt;more info&lt;/a&gt;)&lt;/b&gt;&lt;br&gt;Abstract: &lt;i&gt;Since the introduction of SharePoint 2007 lots has changed in the .NET world: version 3.0 and 3.5 of the .NET Framework have been released, which include technologies such as WCF, Silverlight and Linq. This session will focus on how you can use these new technologies in your SharePoint 2007 projects, the do's and the don'ts, and the resulting advantages.&lt;/i&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Pimp Up Your SharePoint Site (&lt;a href="http://www.devdays.nl/Sessies/Detail.aspx?code=OFF05JT" mce_href="http://www.devdays.nl/Sessies/Detail.aspx?code=OFF05JT"&gt;more info&lt;/a&gt;)&lt;/b&gt;&lt;br&gt;Abstract: &lt;i&gt;SharePoint 2007 has a nice web user interface available for its users, but this out-of-the-box user interface can look quite old fashioned compared to new Web 2.0 web sites on the internet. This session will focus how you can give your existing SharePoint sites some extra punch by using Web 2.0 technologies such as AJAX, Silverlight and jQuery. And the good news is that it's not always required to implement very intrusive solutions; even small changes can make your SharePoint sites rise and shine again.&lt;/i&gt;&lt;/li&gt;&lt;/ul&gt;Btw, the DevDays are a great way to interact with the Dutch SharePoint community; which is very well represented: &lt;a href="http://feeds2.feedburner.com/MirjamsBlog" mce_href="http://feeds2.feedburner.com/MirjamsBlog"&gt;Mirjam van Olst&lt;/a&gt;, &lt;a href="http://blogs.code-counsel.net/Wouter/default.aspx" mce_href="http://blogs.code-counsel.net/Wouter/default.aspx"&gt;Wouter van Vugt&lt;/a&gt;, &lt;a href="http://www.tonstegeman.com/Blog/default.aspx" mce_href="http://www.tonstegeman.com/Blog/default.aspx"&gt;Ton Stegman&lt;/a&gt;, &lt;a href="http://blog.mastykarz.nl/" mce_href="http://blog.mastykarz.nl/"&gt;Waldek Mastykarz&lt;/a&gt;, and many, many more. So I hope to see you there and feel free to drop by to say hi! :-)&lt;br&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7097843" width="1" height="1"&gt;</content><author><name>jantie</name><uri>http://weblogs.asp.net/members/jantie.aspx</uri></author><category term="SharePoint" scheme="http://weblogs.asp.net/jan/archive/tags/SharePoint/default.aspx" /><category term="DevDays09" scheme="http://weblogs.asp.net/jan/archive/tags/DevDays09/default.aspx" /></entry></feed>