2

I have tried all the methods suggested online. But none seems to work. I tried the following,

<script>
  document.all("Add new document").innerHTML="Add ur new text";
</script> 

and this

http://techtrainingnotes.blogspot.com/2010/08/sharepoint-2010-change-add-new-item-and.html
<script>
var ttnA = document.getElementsByTagName('A');
var ttnCounter = 0;
for (var j=0; j<ttnA.length; j++)
{
  if (ttnA[j].id == 'idHomePageNewItem')
  {
    ttnCounter ++;
    if (ttnCounter == 2)
      { ttnA[j].innerHTML='your new text goes here' }
  }
}
</script>

How can I change the text of the "Add new event" in web part? and where to add the java script exactly?

1
  • can you provide an image where the text "Add new event" is located? Commented Apr 13, 2013 at 21:27

1 Answer 1

1

I attempted to add a Calendar web part that had an "Add new event" link but none of mine did. Without seeing your web part though, I would imagine that it's much like editing the "Add new item" link to lists (and list web parts).

  1. Open the site in Sharepoint Designer.
  2. In the Preview pane, click somewhere near the link you'd like to edit. The List View Tools menu will appear in the ribbon.
  3. Click on the Design tab.
  4. Locate and click on Options, and select Summary Toolbar.
  5. To the right of Options, click on Customize XSLT, and select Customize Entire View.
  6. Now return to the link and hover over it with your mouse. You should now see a small tab with an > arrow. Click on it and select Hyperlink Options....
  7. At the top, you should see a field titled Text to display. Change the value of the field to whatever you'd like. Click OK when finished.
  8. Save your site and refresh in browser.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.