Getting SharePoint List Items using JQUERY


<script type="text/javascript" src="/_layouts/images/Tri/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="/_layouts/images/Tri/jquery.SPServices-0.7.2.min.js"></script>
<script language="javascript" type="text/javascript">

    $(document).ready(function () {
        $().SPServices({
            operation: "GetListItems",
            async: false,
            listName: "Tasks",
            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"/>


Comments

Popular posts from this blog

IRM and the Object Model

This content database has a schema version which is not supported in this farm

Activate and Deactivate Feature through PowerShell