RSS

How to change sharepoint button text on runtime?

22 Mar

Did you ever tried to change the text of sharepoint button using sharepoint designer. for eg: i had a requirement to change the “FINISH” to “SUBMIT” of Survey dataview webpart….i have tried to update directly from sharepoint designer but was a failure…..finally i got the below code …

try this….
Open your page in sharepoint designer. checkout the requiredd page and paste below code… and update your text…

<script>
var x=document.getElementsByTagName(“input”);
for (var i=0;i<x.length;i++)
  {
  if (x.item(i).type==”button”&&x.item(i).value==”Finish”)
     {x.item(i).value = “Submit”};
  }
</script>

Advertisements
 

Tags:

2 responses to “How to change sharepoint button text on runtime?

  1. Pete

    October 1, 2009 at 7:07 PM

    Thanks for posting.

    Paste it where in the code?

     
  2. Don Scott

    February 13, 2012 at 7:11 PM

    Thank you! I had exactly the same requirement for a customer and your implementation worked flawlessly. I pasted the code inside an asp:Content tag after the List Form web part.

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: