Posted: November 10th, 2009 | Author: davecavins | Filed under: General SharePoint, SharePoint Design | Tags: jQuery, SharePoint, slideshow, web services, webparts | 11 Comments »
This is a very simple image slide show script that uses jQuery, SharePoint webservices and the default images library to show images with captions. All the content is pulled from default fields in the images library but feel free to add more fields and customize the code to fit your needs.

Slide show with captions
Read the rest of this entry »
Posted: November 2nd, 2009 | Author: davecavins | Filed under: General SharePoint, SharePoint Design | Tags: forms, jQuery, SharePoint, textarea | 6 Comments »
So one of the things that I have had end users complain to me about is the size of the text boxes on the new and edit forms of lists like the contacts list and announcement list. On a recent non-SharePoint project I used a jQuery plugin to create a resizable text area so I tried to implement it in SharePoint. Here is what happened.
I downloaded the Textarea Resize JavaScript jQuery plugin, saved in a SharePoint library along with the latest version of jQuery.
Selecting the Element
In order for the jQuery code to work it has to know which elements on the page you want to work with.
Here is the code SharePoint renders for a text box:
<textarea name="ctl00$m$g_3fa2cde8_0ea8_4421_814f_6a6d292fbe54$ctl00
$ctl04$ctl0ctl00$TextField"
rows="15"
cols="20" id="ctl00_m_g_3fa2cde8_0ea8_4421_ctl00_TextField" title="Body"
class="ms-long" dir="none"></textarea>
There are two problems:
- ASP.NET creates very long and hard to use IDs
- The class ms-long culd apply to other elements on the page that I dont want to use the effect on.
Read the rest of this entry »
Posted: October 28th, 2009 | Author: davecavins | Filed under: General SharePoint, SharePoint Design | Tags: jQuery, search, SharePoint, suggestions | No Comments »
In Part 1 of this post we used a simple javascript to display suggestions on a custom search box. After I wrote that post I was thinking it would make more sense to read the suggestions from a list instead of a JavaScript file. This post will explain how to setup the list and edit the JavaScript to read the suggestions from a list. The idea is that an administrator could manage the list and help guide users toward specific information instead of getting numerous un-related results like in those commercials for bing.
Assuming you already have the search box setup as described in Part one of this post all you will need to do is change the javascript and add some code to the page. Read the rest of this entry »
Posted: October 27th, 2009 | Author: davecavins | Filed under: General SharePoint | Tags: Chip Dizard, Google Wave, SharePoint 2010 | No Comments »
I was reading this article last week and it reminded me of a conversation I had with a developer friend of mine back when SharePoint 2007 came out. I was telling him that because of the ability to integrate so closely with Office SharePoint would end up dominating the market for collaboration tools.
SharePoint is not the only collaboration tool available and some would say it is not the best tool either. Google Wave, BaseCamp, Salesforce.com and others offer similar capabilities in some areas. As Chip Dizard of Absolute Presence points out Wave does not work well with IE but does integrate nicely with Google’s other online tools (Docs, Calendar, etc.). For open source fans and Microsoft haters there are several good options but it is hard to deny the convenience of SharePoint.
Most large organizations are already using Microsoft Office products for email and word processing so the fact that SharePoint works seamlessly with these applications makes it an obvious choice when it comes time to collaborate and share information. Even SharePoint 2003 had some integration with the Office products but Microsoft has taken things even further in SharePoint 2010. With such a fully integrated solution that most users will have to use as part of their work competitors like Google will have a tough time selling to businesses and large organizations.
For smaller organizations that don’t have the resources or the need for all of SharePoint’s features may Google Wave and other tools very useful. Larger organizations who require information security, full control and data backups will find SharePoint quite capable. This article has more information on how the SharePoint team has worked to build SharePoint into its own platform
Posted: October 9th, 2009 | Author: davecavins | Filed under: General SharePoint, SharePoint Design | Tags: blog, CSS, SharePoint, SharePoint Designer | 4 Comments »
Out of the box the comments on SharePoint blogs dont look that good.

Standard SharePoint blog comments
Here is a way to fix that problem. Just add this CSS to the page and things should start looking alot better. Read the rest of this entry »
Posted: September 28th, 2009 | Author: davecavins | Filed under: General SharePoint, SharePoint Design | Tags: page title, SharePoint | No Comments »
When working with multiple browser windows open its hard to tell one from the other because most SharePoint pages don’t offer a useful title. So in most cases you will see something like this (I am using the dreaded IE 6 unfortunately). As you can see most SharePoint pages only show the title of the page. On the home page of some sites the site name is shown as well.

Useless Page Titles
Ideally the page title should not only tell you the title of the page you are looking at but also what site you are on. Chris Coyier of CSS-Tricks talks more about different options in this post. After some experimenting I was able to get this working in SharePoint.
Read the rest of this entry »
Posted: September 15th, 2009 | Author: davecavins | Filed under: General SharePoint | Tags: attachments, Data View Web Part, SharePoint, xsl | 6 Comments »
So on a recent project I needed to show a link to the attachment for each item in a list. A quick Google search found How to show Attachments with DataFormWebPart from Dario Martirani Paolillo’s Web Log. I was excited because it seemed to work well and was very easy to implement.
As I was about to finish up the project I was given some new requirements which meant that there would be two Data View Web Parts on the page and both would need to show the attachments link. This is when the issues started. When you have two web parts on the page using the display attachments code the second one will just show “[value of field: Attachments]” instead of the actual link. If anyone knows a good solution for this issue please post a comment.
I want to avoid using something like this jQuery solution by Paul Grenier simply because of the performance issues it will create.
Posted: July 14th, 2009 | Author: davecavins | Filed under: General SharePoint, SharePoint Design | Tags: Data View Web Part, Endusersharepoint, Gabe Hilado, jQuery | 1 Comment »
A while back there was a post on EndUserSharePoint.com by Paul Grenier that described how to use jQuery and the CEWP to make a preview pane. I thought it was a very nice solution and worked better than the out of the box preview pane SharePoint uses.
Too Much Code
The only issue is the preview pane solution is that in environments with slow internet connections the preview pane will be almost as slow as if the user actually broswed to the display form for the item.
Although its done through AJAX jQuery is still having to load the whole DispForm.aspx and then only displaying the contents of a specific element. DispForm.aspx when rendered through the borwser (like most pages in SharePoint) is very code heavy with over 700 lines of code ( An Announcement List item). Reducing the amount of code jQuery has to load from the diplay form will decrease load times and make everyone happy.
Faster
Gabe Hilado and I decided to try to make it faster. The simple solution is to make your own diplay form in SharePoint Designer. First we tried creating a blank .aspx page and putting the list view webpart on it. The reduced the amount of code on the page but I wanted it to be even faster.
Read the rest of this entry »
Posted: June 14th, 2009 | Author: davecavins | Filed under: General SharePoint | Tags: corasworks, SharePoint, webparts | 2 Comments »
Last week I attended CorasWorks Essentials Training the the company headquarters in Reston, VA. The training class provided an overview of the essential features and capabilities of the CorasWorks suite of tools as well as covering usage and configuration.
The major benefits of the suite are its ability to do charting and to aggregate information across various sites, site collections, and web applications in a manner not possible with out of the box SharePoint tools (not even the DVWP). Read the rest of this entry »
Posted: February 14th, 2009 | Author: davecavins | Filed under: General SharePoint, SharePoint Design | Tags: MOSS 2007, SharePoint | No Comments »
To add custom styles or functionality to a SharePoint page often requires including JavaScript or CSS files that need to be referenced within the <head> tag. Instead of adding these items to the masterpage and thus every page on the whole site it is better to just add them on only the pages that need them.
Many people use a hidden content editor webpart for this purpose but there is a second option. On each page layout there is a Content placeholder called “AdditionalPageHead”.
<asp:ContentPlaceHolder id="AdditionalPageHead" runat="server">
</asp:ContentPlaceHolder>
Anything placed inside this placehodler will be added to the head of the rendered page.
You can also create your own custom placeholders in the masterpage and page layout to allow you to add items to any part of the masterpage. For instance I have created a custom placeholder to insert webparts in the footer area of the masterpage.