Picture Library SlideShow web part Web Part not displaying image in original size

Create a CEWP and add this script:

<script type="text/javascript">

function SlideshowObjectInitializer() {

  ShowPic = (function(ShowPicOrig) {
      return function() {

           var ssObj = arguments[0];  //SlideShow object
           var curPicIdx=ssObj.index; //current picture index

           ShowPicOrig.apply(this, arguments); //call original ShowPic

           //apply some changes to display original picture in SlideShow control
           ssObj.image.src = ssObj.linkArray[curPicIdx]; //display original image instead of web image
           //change picture & container size to auto instead of fixed (by default web image size is used)
             var cell = ssObj.cell; 
             cell.style.width = 'auto';
             cell.style.height = 'auto';
             cell.style.display = '';
             var pcell = ssObj.cell.parentNode; 
           pcell.style.width = 'auto';
             pcell.style.height = 'auto';
ExecuteOrDelayUntilScriptLoaded(SlideshowObjectInitializer, 'imglib.js');

Change SharePoint Survey option “Specify your own value”

Found this good tips to change the default option “Specify your own value” to something else:

SharePoint 2010-Change Survey Option “Specify your own value:” to “Other:”

Quick instructions:
1. Edit the NewForm.aspx & EditForm.aspx using SharePoint Designer.
2. Add new Content Editor Web Part below the default List Form Web Part.
3. Add the following script in the CDATA section.

<script type="text/javascript">// <![CDATA[
     var labels = document.getElementsByTagName("label");
     for(var i = 0; i <labels.length; i++)
            if(labels[i].innerHTML == "Specify your own value:")
                 labels[i].innerHTML = "Others, please specify:";
// ]]></script>

There are other ways such as changing the masterpage or some of the core .js file, which I will not recommend.

Highlight row in SharePoint list using Calculated Field

Using calculated column to write html has been well known since SharePoint 2007. I always like to do this because it does not require complex customization on xslt or even SharePoint designer. Today I check out this blog which has more good examples: http://sharepointwijzer.nl/sharepoint-blog/tech/icc-html-calculated-column-sharepoint-view/#ICCadvanced

I would like to share a simple solution to highlight rows in SharePoint list using calculated field.


Calculated formula:

=IF([YesNo],"<img src='/_layouts/images/blank.gif' onload='javascript:{this.parentNode.parentNode.parentNode.style.backgroundColor=""Yellow"";}'>","")

Simple. Hope this save the time many out there seeking for quick solution.

SharePoint change Save button to Send

This is quick workaround to change the default “Save” button to “Send” or any word, in the default SharePoint list form such as newitem.aspx.

1. Go the Edit mode of the form. (List Tools(Ribbon) > Form Web Parts > Default New Form)

2. Add a Content Editor Web Part and enter the following java script.

<script type="text/javascript">
function changeSaveButton()
 var inputs = document.getElementsByTagName("input"); 
 for(i = 0; i<inputs.length; i++) 
  if(inputs[i].type == "button" && inputs[i].value == "Save") 
   inputs[i].value = "Submit"; 


3. Save and done.

No need InfoPath. No need SharePoint Designer.

SharePoint Default List Form and InfoPath


Require custom Display form, remain default New and Edit item form for a SharePoint custom list.


Create custom InfoPath form to replace default DispForm.aspx.


SharePoint list automatically associate edit form from InfoPath. Using SharePoint Designer to set the default form does not work.


  1. Go to List Settings > Form Settings > choose “Use the default SharePoint form” without checking “Delete the InfoPath Form from the server”. This will reset the list to use back all the default form.
  2. Go to SharePoint Designer, select displayifs.aspx and Set as Default. This will set the InfoPath form as the default display form.



Access denied by Business Data Connectivity

Creating external content type and external list is rather straight forward. But then, I came across this “Access denied by Business Data Connectivity” today. I got this error even I am using the site collection admin account.

The solution is to configure the permission on the BCS Entity. Found the solution from this site: http://zimmergren.net/technical/access-denied-by-business-data-connectivity-solution

InfoPath 2010 – Hide control base on other field input

How to hide a control or particular section in SharePoint form base on other field input? Can be done easily using InfoPath 2010, using Rule.

First, I have a drop down list control with choices of “Yes” or “No”.Then I have another section which consist a date picker. That section with date picker shall only be appear if the drop down list is selected as “Yes”. When the form load, the date picker shall be hidden. For the section I want it to be hidden, I use a Section as container, put few text and a date picker inside it. Next are the steps to configure “Rules”.

1. Select the section and Manage Rules from the Home toolbar.

2. Click on New and select Formatting.

3. In the Condition, set this rule: <DropDownList> is not equal to “Yes”.

4. Check on Hide this control. Done.

Just a simple scenario. The rule can be flexible as long satisfy the condition to hide the section or a control. This method also can be useful to do other type of formatting such as changing the colour of particular text.