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).

  • 1
    FYI - I've added GetVersionCollection into the latest alpha on SPServices, but I don't think it's going to be as useful as you'd like. See spservices.codeplex.com/releases/view/77486 – Marc D Anderson Dec 30 '11 at 20:36
  • Thanks Marc. Actually, I found the GetVersionCollection that you added into the latest alpha1 on SPServices very useful as it allow me to track the version history of each item in the list. Well Done. :) – Larry Morries Jan 3 '12 at 1:07

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:

    operation: "GetVersions",
    fileName: "http://spsrv2010/DocLib/file.txt",
    completefunc: function (xData, Status) {
        // Do other stuff...
| improve this answer | |
  • Hi Danny, does it also get versions from items in a SharePoint 2007 List? (Cause I notice that it need to know a filename - which probably a file from a SharePoint 2007 Library, but does a item in a Sharepoint 2007 List have a filename?) – Larry Morries Nov 24 '11 at 0:49
  • Larry - for a standard list, you will actually want to use the 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/… – Danny Jessee Nov 24 '11 at 14:22
  • If you want a Web Service operation that isn't included in SPServices, please leave a message in the Discussions, and I'll get it in there for you. – Marc D Anderson Nov 28 '11 at 1:04
  • @MarcDAnderson Thanks Marc, I posted a new discussion over there. (spservices.codeplex.com/discussions/284298) – Larry Morries Dec 28 '11 at 2:13

You can make ajax calls to version webservice http:///_vti_bin/versions.asmx

See the below link make ajax cal to webservice


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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