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).
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).
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...
}
});
GetVersionCollection method of the Lists web service. Unfortunately, it doesn't look like SPServices has support for that particular method at this point. With that in mind, you may want to use dhanya's approach. The MSDN documentation for the GetVersionCollection method can be found here: msdn.microsoft.com/en-us/library/…
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/