How can i read a column value value of a share point list using Jquery and SP services
This can be achieved by the following java script function .
Make sure in your JS page you have refered the jquery and spservices link
//read the tiltle field value of ABC list
function ReadColumnValue()
{
var myvalue=null;
var strViewfields = "<ViewFields><FieldRef Name='Title'/></ViewFields>";
$().SPServices({
webURL: strSiteURL,
operation: "GetListItems",
async: false,
listName: "ABC",
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function () {
if($(this).attr("ows_title")!= undefined)
{
myvalue=$(this).attr("ows_title");
}
});
}
});
the variable myvalue will containt eh list column value of the tilte field of the AB list
This can be achieved by the following java script function .
Make sure in your JS page you have refered the jquery and spservices link
//read the tiltle field value of ABC list
function ReadColumnValue()
{
var myvalue=null;
var strViewfields = "<ViewFields><FieldRef Name='Title'/></ViewFields>";
$().SPServices({
webURL: strSiteURL,
operation: "GetListItems",
async: false,
listName: "ABC",
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function () {
if($(this).attr("ows_title")!= undefined)
{
myvalue=$(this).attr("ows_title");
}
});
}
});
the variable myvalue will containt eh list column value of the tilte field of the AB list
No comments:
Post a Comment