Sunday, 2 March 2014

SharePoint 2010 Change Add New Item Link Text

SharePoint 2010 Change Add New Item Link Text
Edit SharePoint Page where you want to change the name of list text
Add a Content Editor Web Part to the page.
Best practice with the 2010 CEWP is to store your HTML and JavaScript in a text file in a library and then use the CEWP’s link to a file option.
Each webpart will have it's own ID.....
idHomePageNewItem-->id for one webpart.....Please find exact list id and use that id in the javascript...
var ttnA = document.getElementsByTagName('A');
for (var j=0; j<ttnA.length; j++)
{
if (ttnA[j].id == 'idHomePageNewItem')
{
ttnA[j].innerHTML='your new text goes here'
}
}
1.Create a text file with the JavaScript (Above code) and upload to a library
2.In the library right-click the file, click Properties and copy the URL of the file
3.Add an Content Editor Web Part (CEWP) below the web part you want to customize
4.From the CEWP click web part’s dropdown arrow and click Edit Web Part
5.Paste the URL you copied into the Content Link box