Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7954641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:29:24+00:00 2026-06-04T03:29:24+00:00

I am trying to get all list items of a sharepoint list using WebServices

  • 0

I am trying to get all list items of a sharepoint list using WebServices into a Windows 7 gadget, but I am not really sure how I can do that,

I find this code on google without any explanation, So I dont know how I will get the data of list using this code and then display in a Windows Gadget.

Can anyone guide me to the right direction please ?

Gadget.xml is

    <?xml version="1.0" encoding="utf-8" ?>
<gadget>
  <name>HelloGadget</name>
  <version>1.0.0.0</version>
  <description>Hello World Gadget.</description>
  <hosts>
    <host name="sidebar">
      <base type="HTML" apiVersion="1.0.0" src="first.html" />
      <permissions>Full</permissions>
      <platform minPlatformVersion="1.0" />
    </host>
  </hosts>
</gadget>

first.html is

    <html>
<script>
//----------------- resizes the gadget display surface
function DoInit() {
    document.body.style.width = 90;
    document.body.style.height= 55;
    document.body.style.margin=0;
}

    $(document).ready(function() 
{
    var soapEnv =
        "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> 
            <soapenv:Body> 
                 <GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> 
                    <listName>ListName</listName> 
                    <viewFields> 
                        <ViewFields> 
                           <FieldRef Name='Title' /> 
                       </ViewFields> 
                    </viewFields> 
                </GetListItems> 
            </soapenv:Body> 
        </soapenv:Envelope>";

    $.ajax({
        url: "http://my_site/_vti_bin/lists.asmx",
        type: "POST",
        dataType: "xml",
        data: soapEnv,
        complete: processResult,
        contentType: "text/xml; charset="utf-8""
    });
});

function processResult(xData, status) {
    $(xData.responseXML).find("z\:row").each(function() {
        alert($(this).attr("ows_Title"));
    });
}

</script>
<body onload="DoInit();">
<table border="5"><tr><td><center><i>Hello World!</i></center></td></tr></table>
<div id = "clickit"> <button type="button" onclick="" >Click Me!</button> </div>
</body>
</html>

Cheers

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T03:29:26+00:00Added an answer on June 4, 2026 at 3:29 am

    We are all familiar with SQL. There is a new jQuery library called SPSQL. This is really cool because you can query SharePoint using SQL syntax. Just add the appropriate libraries and you are on your way. See the example below and article here.

    To get items, just do the following:

    var result = SPSql.parseSQL('SELECT MyList.Field FROM MyList WHERE MyList.ID > 10 ORDER BY  MyList.ID DESC');
    

    Now it is possible to process all result rows:

    for (var row = 0; row < result.length; row++) {
       for (var column in result[row])
          alert( column + ": " + result[row][column] );
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get a list in JavaScript (not using jQuery) of all the
Trying to get a list of all substrings currently I have a function but
I am trying to get the code to list all the directories in a
I'm trying to get a list of all the users from users table and
I was trying to write a function to get all subsequences of a list
For a blogging app, I'm trying to get a list of all months, in
I am trying to do a simple query to get a list of all
I'm trying to parse this XML I want to get a list of all
Here's what I'm trying to do: I want to get a list of all
I'm trying to LEFT JOIN two tables, to get a list of all rows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.