Search This Blog

Saturday, October 24, 2009

Hide Save button on Multipage Survey Page

To hide save button on mutipage survey following javascript can be used. Insert following javascript block within PlaceHolderMain after <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server"> line of NewForm.aspx & EditForm.aspx page of the Survey

<script type="text/javascript" >
_spBodyOnLoadFunctionNames.push('hideSave');

function hideSave()
{
var tags=document.getElementsByTagName('input');
alert(tags.length);
for(var i=1; i<tags.length; i++)
{
if(tags[i].value=='Save')
{
tags[i].style.visibility='hidden';
}
}
}
</script>

Saturday, October 10, 2009

Show PDF icon in SharePoint Library view

To show the PDF icon (or any other icon) in SharePoint Document Library view do following:
1. Find 16x16 icon file, say pdficon.gif and upload it under \12\TEMPLATE\IMAGES folder
2. Then open \12\TEMPLATE\XML\DOCICON.XML and in the "By Extension" section add the following configuration line:
< key="pdf" value="pdficon.gif">

Restart IIS and now PDF icon should appear against PDF files in any document Library.

Do the same for other file types also.