Advertisement
Jonas_Alves

Untitled

Apr 22nd, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.73 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <%@ Page Language="C#" %>
  3. <%@ Register tagprefix="SharePoint" namespace="Microsoft.SharePoint.WebControls" assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
  4. <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
  5.  
  6. <head runat="server">
  7. <meta name="WebPartPageExpansion" content="full" />
  8. <meta http-equiv="X-UA-Compatible" content="IE=10" />
  9. <SharePoint:CssRegistration Name="default" runat="server"/>
  10. <script type="text/javascript" src="https://imago.sharepoint.com/sites/jonas.cruz/js/jquery-2.1.3.min.js"></script>
  11. <script type="text/javascript" src="https://imago.sharepoint.com/sites/jonas.cruz/js/jquery.SPServices-0.7.2.js"></script>
  12. <script>
  13.     var htmlTable = '<table>';
  14.     $().SPServices(
  15.     {
  16.         operation: "GetListItems",
  17.         //async: false,
  18.         listName: "Clientes",
  19.         CAMLQuery: "<Query><Where><Eq><FieldRef Name='Sexo' /><Value Type='Choice'>Masculino</Value></Eq></Where></Query>",
  20.         CAMLViewFields:"<ViewFields>" +
  21.         "<FieldRef Name='ID' />" +
  22.         "<FieldRef Name='Nomee' />" +
  23.         "<FieldRef Name='Sexo' />" +
  24.         "<FieldRef Name='Email' />" +
  25.         "</ViewFields>",    
  26.         completefunc: function (xData, Status)
  27.         {
  28.             $(xData.responseXML).SPFilterNode('z:row').each(function()
  29.             {
  30.                 var liHtml = "<li>" + $(this).attr("ows_Title") + " | " + $(this).attr("ows_CPF") + " | " + $(this).attr("ows_Sexo") + " | " + $(this).attr("ows_DataNasc") + " | " + $(this).attr("ows_Email") + "</li>";
  31.                 $("#tasksUL").append(liHtml);
  32.             })
  33.         }
  34.     });
  35. </script>
  36. </head>
  37. <body>
  38.     <ul id="tasksUL"/>
  39. </body>
  40.  
  41. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement