Friday, September 16, 2011

View/Hide content in sharepoint

Pace the code in html page and upload in to a page library and show it in page viewer webpart

<html>
<head>
<style type="text/css">
<!--
criteriaResp {
 margin-bottom: 10px;
 margin-top: 0px;
 margin-right: 0px;
 margin-left: 0px;
}
.hoverTextResp {
 border: thin solid #999999;
 font-family: Calibri;
 width: 555px;
 padding-top: 5px;
 padding-right: 5px;
 padding-bottom: 0px;
 padding-left: 5px;
}
-->
</style>
<script language="javascript">
var k;
function showHideResp(k)
{
 if(k=='one'){
document.getElementById('oneTextResp').style.display='';
document.getElementById('twoTextResp').style.display='none';
document.getElementById('threeTextResp').style.display='none';
}
 if(k=='two'){
document.getElementById('oneTextResp').style.display='none';
document.getElementById('twoTextResp').style.display='';
document.getElementById('threeTextResp').style.display='none';
}
if(k=='three'){
document.getElementById('oneTextResp').style.display='none';
document.getElementById('twoTextResp').style.display='none';
document.getElementById('threeTextResp').style.display='';
}

}
</script>
</head>
<body >

<table >
<tr>
<td>
<table>
<tr>
<td>
<A id="one"  href="#" onmouseover="showHideResp('one')">
<img
src="https://km.ca.com/rnd/MyTeams/buops/lodcommunity/PublishingImages/challengeBox.JPG" ></A>
</td>
<td>
<div id="oneTextResp" style="display:none; text-align:left"   class="hoverTextResp">
<img
src="https://km.ca.com/rnd/MyTeams/buops/lodcommunity/PublishingImages/challengeArrow.JPG" ></div>
</td>
</tr>
<tr>
<td>
<A id="two"  href="#" onmouseover="showHideResp('two')">
<img
src="https://km.ca.com/rnd/MyTeams/buops/lodcommunity/PublishingImages/ResponseBox.JPG" ></A>
</td>
<td>
<div id="twoTextResp" style="display:none; text-align:left"   class="hoverTextResp">
<img
src="https://km.ca.com/rnd/MyTeams/buops/lodcommunity/PublishingImages/ResponseArrow.JPG" ></div>
</td>
</tr>
<tr>
<td>
<A id="three"  href="#" onmouseover="showHideResp('three')">
<img
src="https://km.ca.com/rnd/MyTeams/buops/lodcommunity/PublishingImages/ResultBox.JPG" >
</A>
</td>
<td>
<div id="threeTextResp" style="display:none; text-align:left"   class="hoverTextResp">
<img
src="https://km.ca.com/rnd/MyTeams/buops/lodcommunity/PublishingImages/ResultArrow.JPG" >
</div>
</td>
</tr>
</table>

</td>
<td>
<img
src="https://km.ca.com/rnd/MyTeams/buops/lodcommunity/PublishingImages/greyBox.JPG" >
</td>

<tr>
</table>
</body>

Thursday, July 28, 2011

Steps to Embedding Power Point(.ppt) presentation in SharePoint page

Follow the below steps to embedding power point presentation in share point page.

Step-1: Open ppt file in local machine and save as single webpage(.mht)
Step-2: Open share point site and upload this file (.mht) in to a document library.
Step-3: Copy the url of the file from document library.
Step-4: Create a page and place "page viewer web part" and give the above copied url in web part configuration.
Strp-5: Finally we will able to see power point presentation in share point page.


Advantages: There is no need to have client software of ppt installed in end user's machine.

Monday, July 18, 2011

Play video files (youTube etc) files in sharepoint

Place the following code in content Editor Webpart

 <object width="380" height="385">
                    <param name="movie" value="http://www.youtube.com/v/i5VDAx1xD3E123&hl=en_GB&fs=1&rel=0&color1=0x2b405b&color2=0x6b8ab6"></param>
                   <param name="allowFullScreen" value="true"></param>
                   <param name="allowscriptaccess" value="always"></param>
                   <embed src="http://www.youtube.com/v/i5VDAx1xD3E123&hl=en_GB&fs=1&rel=0&color1=0x2b405b&color2=0x6b8ab6" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="650" height="385"></embed>
               </object>

Wednesday, April 6, 2011

Easy TABs code of Web part zone

Moss 2007 Easy TABs code of Web part zone

In a web part zone add “content editor web part” and paste the following code and make it as hidden web part.

<script id="EasyTabsScript" type="text/javascript">
var TabCookie = "TabCookie" + window.location.pathname;

function GetParentTable(elem)
{
while(elem !=null && elem.tagName !="TABLE") elem=elem.parentNode;
return elem;
}

function activateTab(selectedtab) {
if (WPzone.id != "MSOZone") {
var allTabs = document.getElementById("EasyTabs").getElementsByTagName("SPAN");
for (i=0;i<allTabs.length;i++) {
var WPCellID = allTabs[i].id.replace(/tab/,"MSOZoneCell_");
var TitleID = allTabs[i].id.replace(/tabWebPartWPQ/,"WebPartTitleWPQ");
if (allTabs[i] == selectedtab) {
allTabs[i].className = "ms-tabselected";
document.getElementById(WPCellID).parentNode.style.display = "";
document.getElementById(TitleID).parentNode.style.display = "none";
}
else {
allTabs[i].className = "ms-tabinactive";
document.getElementById(WPCellID).parentNode.style.display = "none";
}
}
}
}

function BuildEasyTabs(){

var TabsTD = document.createElement("TD");
TabsTD.className = "ms-siteactionsmenu";
TabsTD.id = "EasyTabs";

var SeparatorTD = document.createElement("TD");
SeparatorTD.style.height = "5px";
SeparatorTD.className = "ms-pagetitleareaframe";

var theDIVs = WPzone.getElementsByTagName("DIV");
for (i=0;i<theDIVs.length;i++) {
if (theDIVs[i].className.indexOf("ms-PartSpacing")==0) {
theDIVs[i].style.display="none";
}
if ((theDIVs[i].id.indexOf("WebPartWPQ")==0) && (GetParentTable(theDIVs[i]).style.display!="none")) {
var TitleID = theDIVs[i].id.replace(/WebPartWPQ/,"WebPartTitleWPQ");
var NewSPAN = document.getElementById(TitleID).getElementsByTagName("SPAN")[0].cloneNode(true);

NewSPAN.className = "ms-tabinactive";
NewSPAN.style.height = "18px";
NewSPAN.id = "tab" + theDIVs[i].id ;
NewSPAN.onclick = function() {SetCookie(TabCookie,this.id,"/");activateTab(this);}
TabsTD.appendChild(NewSPAN);

}
}

WPzone.insertRow(0);
WPzone.rows[0].appendChild(SeparatorTD);
WPzone.insertRow(0);
WPzone.rows[0].appendChild(TabsTD);

if (GetCookie(TabCookie)!= null) {var ActiveTab = document.getElementById(GetCookie(TabCookie));}
else {var ActiveTab = TabsTD.getElementsByTagName("SPAN")[0];}

activateTab(ActiveTab);
}

var WPzone = GetParentTable(GetParentTable(document.getElementById("EasyTabsScript")).parentNode);

_spBodyOnLoadFunctionNames.push('BuildEasyTabs');

</script>

Monday, February 21, 2011

How to hide left side quick naviagation

&lt style &rt
.ms-navframe {
display:none;
}
 &lt /style &rt


Place this code in Content Editor Webpart of the same page

How to hide left side quick naviagation