Change Display Name of the column using JavaScript in New/Edit Form in SharePoint <script type="text/javascript"> // this is default SharePoint function //it will call after page is loaded. _spBodyOnLoadFunctionNames.push("split"); //this function finds all <nobr> tag //then check our original text and //replace new text which contains <br> function split() { var oP = document.getElementsByTagName('nobr');//the collection of <p> tags for(var i=0;i<oP.length;i++) { //alert(oP[i].innerHTML); if(oP[i].innerHTML == "Location change Comments" || oP[i].innerHTML == "New Adjacencies Comments" || oP[i].innerHTML == "MD Presentation Comments"|| oP[i].innerHTML == "Product Missing From Floor Comments" || oP[i].innerHTML == "Overall Stock Issues Comments"|| oP[i].innerHTML == "Overall Quality of Visit Comments" || oP[i].innerHTML == "Overall Interaction with Management Comments") { oP[i].innerHTML = "Comments" } } } </script>
Monday, March 8, 2010
Change Display Name of the column using JavaScript in New/Edit Form in SharePoint
Posted by Rami Reddy Annapu Reddy at 2:04 AM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment