Friday, May 24, 2013

Sharepoint hide URL and show only the title in HTML

<script type="text/javascript"> 
// Text to HTML 
// Feedback and questions: Christophe@PathToSharePoint.com 
var theTDs = document.getElementsByTagName("TD"); 
var i=0; 
var TDContent = " "; 
while (i < theTDs.length) { 
try {  TDContent = theTDs[i].innerText || theTDs[i].textContent; 
if ((TDContent.indexOf("<div") == 0) && (TDContent.indexOf("</div>") >= 0)) { 
theTDs[i].innerHTML = TDContent;  }} 
catch(err){} 
i=i+1;  } 
// ExpGroupRenderData overwrites the default SharePoint function 
// This part is needed for collapsed groupings 
function ExpGroupRenderData(htmlToRender, groupName, isLoaded) { 
var tbody=document.getElementById("tbod"+groupName+"_"); 
var wrapDiv=document.createElement("div"); 
wrapDiv.innerHTML="<TABLE><TBODY id=\"tbod"+ groupName+"_\" isLoaded=\""+isLoaded+ "\">"+htmlToRender+"</TBODY></TABLE>"; 
var theTBODYTDs = wrapDiv.getElementsByTagName("TD"); var j=0; var TDContent = " "; 
while (j < theTBODYTDs.length) { 
try { 
TDContent = theTBODYTDs[j].innerText || theTBODYTDs[j].textContent; 
if ((TDContent.indexOf("<div") == 0) && (TDContent.indexOf("</div>") >= 0)) { 
theTBODYTDs[j].innerHTML = TDContent;  }  } 
catch(err){}  j=j+1;  }  tbody.parentNode.replaceChild(wrapDiv.firstChild.firstChild,tbody);  } 
</script>

No comments:

Followers

No Locks without Key

🌿 Bible Verse 1 Corinthians 10:13 "No temptation has overtaken you except what is common to mankind. And God is faithful; ...

Who Am I?

My photo
What is mankind that you are mindful of them, human beings that you care for them? Psalms 8:4 But he made us a little lower than Angels and Crowned with Glory and Honor. How majestic is your name in all the Earth Oh Lord our God!