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 8863613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:01:27+00:00 2026-06-14T16:01:27+00:00

I have a SharePoint URL which is just a SharePoint list with some columns

  • 0

I have a SharePoint URL which is just a SharePoint list with some columns and rows of data.

I will like to read that information from that specific URL and put the data on a HTML file through a JavaScript function.

I have no experience about JavaScript & HTML5 at all so, I am not sure how to call to those functions in order to retrieve the data.

That’s what I have so far and it is not working at all:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title></title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width">
</head>

<script type="text/javascript" src="filelink/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="filelink/jquery.SPServices-0.6.2.min.js"></script>
<script language="javascript" type="text/javascript">
    $(document).ready(function() {
      $().SPServices({
        operation: "GetListItems",
        webURL: "http://myURL.aspx",
        async: false,
        listName: "Announcements",
        CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>",
        completefunc: function (xData, Status) {
          $(xData.responseXML).SPFilterNode("z:row").each(function() {
            var liHtml = "<li>" + $(this).attr("ows_Title") + "</li>";
            $("#tasksUL").append(liHtml);
          });
        }
      });
    });
</script>
<ul id="tasksUL"/>  
<body>
</body>
</html>

If I try to open the index.html nothing happens so I don’t know how to call to my functions on my HTML file. Also, I don’t know how to define SP.ClientContext in the HTML file.

Thanks a lot in advance.

  • 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-14T16:01:28+00:00Added an answer on June 14, 2026 at 4:01 pm

    The SPServices library will do that for you very easily.

    You’ll want to use this call. I usually encapsulate it in my own function to make the code prettier, especially if I’m making a lot of AJAX list queries.

    Basically what will happen is SharePoint will return an ugly XML document that has all your list items as defined by the Microsoft Documentation. You’ll traverse this document using SPServices like this:

    <script type="text/javascript" src="filelink/jquery-1.6.1.min.js"></script>
    <script type="text/javascript" src="filelink/jquery.SPServices-0.6.2.min.js"></script>
    <script language="javascript" type="text/javascript">
    
    $(document).ready(function() {
      $().SPServices({
        operation: "GetListItems",
        async: false,
        listName: "Announcements",
        CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>",
        completefunc: function (xData, Status) {
          $(xData.responseXML).SPFilterNode("z:row").each(function() {
            var liHtml = "<li>" + $(this).attr("ows_Title") + "</li>";
            $("#tasksUL").append(liHtml);
          });
        }
      });
    });
    </script>
    <ul id="tasksUL"/>`
    

    Line by line:
    <script type="text/javascript" src="filelink/jquery-1.6.1.min.js"></script>
    JQuery is required by SPServices
    <script type="text/javascript" src="filelink/jquery.SPServices-0.6.2.min.js"></script>
    Including SPServices
    $(document).ready(function() {
    “When the DOM is loaded, execute this function”
    $().SPServices({
    “This is an SPServices function”
    operation: "GetListItems",
    “We are using the ‘GetListItems’ web service”
    async: false,
    “Not asynchronous, do it now”
    listName: "Announcements",
    “We’re using the list ‘Announcements”
    CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>",
    Don’t worry about this line
    completefunc: function (xData, Status) {
    “Run this function when the request is complete. The data is passed as xData, the completion status is passed as Status”
    $(xData.responseXML).SPFilterNode("z:row").each(function() {
    “Take the response string and only take the “row” XML nodes. For each of these nodes, run this function…”
    var liHtml = "<li>" + $(this).attr("ows_Title") + "</li>";
    “Create a variable called liHtml equal to an li tag and the XML attribute ows_Title”
    $("#tasksUL").append(liHtml);
    “Append this list item to the element with an ID of ‘tasksUL'”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a sharepoint custom list and we have 2 columns in there URL
I have a SharePoint list with Content Approval enabled. The business requirement is that
I have a sharepoint 2007 list in which there is a column 'EmpID' which
I have a SharePoint List to which I'm adding new ListItems using the Client
I have a SharePoint page that has a hyperlink which points to a video
I would like to programmatically open a document from a SharePoint URL. I have
We are looking for a SharePoint API that provides all the users/groups which have
I have to develop a web part for SharePoint that reads a list and
I have My Sharepoint Web Service URL, but when i try to access it
I have a sharepoint page that loads six webparts, each one of them consumes

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.