Displaying the item version history programmatically using Javascript
-
06-12-2019 - |
Question
I have a SharePoint 2007 list that have version history enabled.
I am interested to know how do I view the version history of a item using Javascript (or JQuery).
Solution
To make things even simpler on yourself, I would recommend using SPServices.
It has full support for the Versions
web service in both SharePoint 2007 and 2010, which enables you to call the GetVersions
method exposed by that service.
For example:
$().SPServices({
operation: "GetVersions",
fileName: "http://spsrv2010/DocLib/file.txt",
completefunc: function (xData, Status) {
// Do other stuff...
}
});
OTHER TIPS
You can make ajax calls to version webservice http:///_vti_bin/versions.asmx
See the below link make ajax cal to webservice
http://sharepoint-snippets.com/ajax-calls-sharepoint-web-services-using-jquery/
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange