This project has moved and is read-only. For the latest updates, please go here.

Issue using latest jQuery and SPS versions together

Aug 4, 2014 at 8:46 PM
Probably a simple syntax error, but pulling hair out. Anybody see anything wrong here?
<script type="text/javascript" src="./jquery-1.10.2.min.js"></script>
<SCRIPT type="text/javascript" src="./jquery.SPServices-2014.01.min.js"></SCRIPT>
<SCRIPT type="text/javascript">

$(document).ready(function () {

    webURL: //SP2007 SITE NAME//,
    operation: "GetListItems",
    async: false,
    listName: "KeyProjects",
    CAMLQuery: "<Query><Where><Eq><FieldRef Name='Active' /><Value Type='Boolean'>True</Value></Eq></Where><OrderBy><FieldRef Name='SortOrder' /></OrderBy></Query>",
    CAMLViewFields: "<ViewFields><FieldRef Name='ID' /></ViewFields>",          
    completefunc: function (xData, Status) {
                $(xData.responseXML).SPFilterNode("z:row").each(function () {
                                                var fileID = $(this).attr("ows_ID");
Aug 5, 2014 at 2:50 AM
What a the error?

Remove the './' from the script tag src attribute. I never seen that used on script tag definitions, although it's probably not the issue.

Paul T.

-- Sent from Mobile

Aug 5, 2014 at 1:20 PM
When I alert the Status value within the completefun, it displays a generic "error" message. The fileID that is being alerted never runs. The './' is not an issue as I was actually referencing the jQuery and SPS files directly but only changed the value prior to posting here. One last thing to menio is that the list I am trying to reach is actually a doc library if that makes any difference.
Aug 6, 2014 at 1:54 AM
If the 'Status' variable is 'error' then it's an ajax error. The message is not even reaching the sharepoint server.
I can't see anything wrong above. Are you going cross domain?

The fact that it's a Document Library is ok. But the above (once it actually reaches the server) will return documents only at the root of te library.

Paul T.

-- Sent from Mobile

Aug 7, 2014 at 12:48 PM
In your CAML Query, try changing "Boolean" to "Bool" and see if that helps.

Aug 10, 2014 at 3:42 AM
Remove the CAMLQuery and see if you get results. Then build it up again until you get it working.