Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: Pretty new to jQuery trying to do something (hopefully) simple with SPServices

$
0
0
doryphoros wrote:
Great, thank you. Got the data parsed now and stored in variables, just got to figure out the final step. Couldn't have gotten this far without your help!

In case anyone is interested in seeing the finished product, here it is!
$(document).ready(function () {

    var query = "<Query><Where><Geq><FieldRef Name='EndDate' /><Value Type='DateTime'><Today Offset='-2' /></Value></Geq></Where></Query>"

    $().SPServices({
        operation: "GetListItems",
        async: false,
        listName: "calendar",
        webURL: "http://myintranet",
        CAMLQuery: query,
        CAMLViewFields: "<ViewFields><FieldRef Name='Title' /><FieldRef Name='Alert' /></ViewFields>",
        completefunc: function (xData, Status) {
            $(xData.responseXML).SPFilterNode("z:row").each(function () {
                var alertTitle = $(this).attr("ows_Title");
                var isAlert = $(this).attr("ows_Alert");
                if (isAlert == 1) {
                    $('p').filter(function (index) { return $(this).text() === alertTitle; }).css("color", "red");
                    
                }
            });
        }
    });
});
Thanks! for posting the outcome.

I'm trying to figure out how to make the getlistitems function to work and is planning to recreate what you did here,
to learn how I can get it to work in a project I plan to start.

Can you or anyone give me tips on how to recreate the list that uses this?

Thanks in Advance.

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>