how to get data from a sharepoint list using java script and jquery?

Go To StackoverFlow.com

-6

I am new in share point. I want to select data using java script and j-query from share point list and show it on a page.

2012-04-04 03:51
by NJadon
I am new in share point. I dont know what to do and how to do - NJadon 2012-04-04 04:00
Then go read a tutorial, then come back here when you have a specific question - John Saunders 2012-04-04 04:40
-1 if you are new to SharePoint, try using the out of the box features first. You "want" to use JavaScript, but do you actually need to - Christophe 2012-04-04 05:06


3

Sharepoint 2010 use Client Object Model

http://blogs.msdn.com/b/vesku/archive/2010/02/25/how-to-sharepoint-2010-js-client-object-model-and-ui-advancements.aspx

http://www.codeproject.com/Articles/60348/SharePoint-2010-Client-Object-Model-for-JavaScript

Sharepoint 2007 use the below code

 <script language="javascript" type="text/javascript" src="jquery-1.4.3.min.js">   </script>
 <script language="javascript" src="jquery.SPServices-0.7.0.min.js"></script>
 <script type="text/javascript">

    $(document).ready(function () {
         $().SPServices({
            operation: "GetListItems",
            async: false,
            listName: "[LIST NAME]",
            CAMLViewFields: "<ViewFields><FieldRef Name=\"Status\" /><FieldRef Name=\"COLUMN NAME\" /><FieldRef Name=\"COLUMN NAME\" /></ViewFields>",
            completefunc: function (xData, Status) {
               $(xData.responseXML).SPFilterNode("z:row").each(function () {
                  var status = $(this).attr("ows_COLUMN NAME");
                  var createdDate = $(this).attr("ows_COLUMN NAME");

              });
          }
       });
});
</script>
2012-04-04 04:12
by Deepu Madhusoodanan
Ads