How to update JavaScript in SharePoint Ribbon Elements.xml file?
-
Monday, September 20, 2010 9:09 PM
I created Elements.xml file that added button to Ribbon of Web Part page.
I created <CommandUIHandler tag and put JavaScript into CommandAction.
Everything works.I inserted changes to JavaScript and built and deployed project in VS2010.
The button function was not changed the previous JavaScript was used. I uninstalled feature and rebuilt and redeployed project. The button functionality was not changed again.What I have to do that JavaScript changes work in CommandAction?
Thank you in advance for any help.
Boris Nossov
Answers
-
Tuesday, September 21, 2010 6:38 AM
If you open the desired feature you will see a 'button' on the bottom left called manifest, if you click that you have an option edit options around the same place if you click that you can edit the feature xml by default it will be:
<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/">
</Feature>So within that <feature> tag you can add a version="1.0.0.0", so it would look like:
<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/" version="1.0.0.0">
</Feature>Each time you updated xml for your Ribbon you might wanna update the version before you package and roll it out.
Oh and i made a blogpost about it: http://blogs.tamtam.nl/appie/2010/09/22/Updating+Custom+Ribbon+Actions.aspx
- Marked As Answer by bnossov Tuesday, September 21, 2010 4:42 PM
- Edited by Appie SchotMicrosoft Community Contributor Wednesday, September 22, 2010 1:37 PM Added link for future reference
-
Tuesday, September 21, 2010 4:44 PM
It works!
Thank you very much
Boris Nossov
- Marked As Answer by bnossov Tuesday, September 21, 2010 4:45 PM
All Replies
-
Monday, September 20, 2010 9:26 PMYou have to update the feature versio in the <feature> tag (version="1.0.0.0"), and delete your Inet Explorer Cache after deploying the new updated feature and before opening the page.
-
Monday, September 20, 2010 10:56 PM
Thank you very much for your answer.
I built and deployed project in VS2010. Where I can find <feature> tag?
Thanks
-
Tuesday, September 21, 2010 6:38 AM
If you open the desired feature you will see a 'button' on the bottom left called manifest, if you click that you have an option edit options around the same place if you click that you can edit the feature xml by default it will be:
<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/">
</Feature>So within that <feature> tag you can add a version="1.0.0.0", so it would look like:
<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/" version="1.0.0.0">
</Feature>Each time you updated xml for your Ribbon you might wanna update the version before you package and roll it out.
Oh and i made a blogpost about it: http://blogs.tamtam.nl/appie/2010/09/22/Updating+Custom+Ribbon+Actions.aspx
- Marked As Answer by bnossov Tuesday, September 21, 2010 4:42 PM
- Edited by Appie SchotMicrosoft Community Contributor Wednesday, September 22, 2010 1:37 PM Added link for future reference
-
Tuesday, September 21, 2010 4:44 PM
It works!
Thank you very much
Boris Nossov
- Marked As Answer by bnossov Tuesday, September 21, 2010 4:45 PM
-
Friday, June 03, 2011 11:52 AM
Your answer helped me in another issue, thanks a lot for posting and blogging your information.
There is a minor detail that may cause errors: In my instance of SharePoint, the tag to define versions is not "version" but "Version" (case-sensitivity of XML-tags) and requires a "?.?.?.?" format. Trying to use the tag "version" caused a "version attribute not declared" error when trying to add the solution package to SharePoint.

