Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

spservices, jquery

Posted on 2013-05-17
2
Medium Priority
?
421 Views
Last Modified: 2013-05-17
Can somebody please help with understand what this line means in the code below:
var var numRecords = parseInt($(xData.responseXML).SPFilterNode('rs:data').attr('ItemCount'), 10);


I know it's doing some type of count but what is the ",10" for? Thx!

 $().SPServices({
		operation: "GetListItems",
		async: false,
		listName: "Site_Projection",
		CAMLViewFields: "<ViewFields><FieldRef Name='"+sourceTypeLower+"P<wbr ></wbr><wbr ></wbr>rojectedDa<wbr ></wbr>te'></Fiel<wbr ></wbr>dRef></Vie<wbr ></wbr>wFields>",<wbr ></wbr>     
		CAMLQuery: "<Query><Where><And><Eq><F<wbr ></wbr><wbr ></wbr>ieldRef Name='ProgramName' /><Value Type='Lookup'>"+ programName + "</Value></Eq><And><Geq><F<wbr ></wbr><wbr ></wbr>ieldRef Name='"+TypeLower+"P<wbr ></wbr><wbr ></wbr>rojectedDa<wbr ></wbr>te' /><Value Type='DateTime'>" + beginFY + "</Value></Geq><Leq><Field<wbr ></wbr><wbr ></wbr>Ref Name='"+TypeLower+"P<wbr ></wbr><wbr ></wbr>rojectedDa<wbr ></wbr>te' /><Value Type='DateTime'>" + endFY + "</Value></Leq></And></And<wbr ></wbr><wbr ></wbr>></Where><<wbr ></wbr>/Query>",
		completefunc: function (xData, Status) {			
			var numRecords = parseInt($(xData.responseX<wbr ></wbr><wbr ></wbr>ML).SPFilt<wbr ></wbr>erNode('rs<wbr ></wbr>:data').at<wbr ></wbr>tr('ItemCo<wbr ></wbr>unt'), 10);

Open in new window

0
Comment
Question by:Isaac
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
Ioannis Paraskevopoulos earned 1000 total points
ID: 39175434
Hi,

Check this: http://www.w3schools.com/jsref/jsref_parseint.asp

10 says that the string returned by $(xData.responseXML).SPFilterNode('rs:data').attr('ItemCount') is a decimal.

Giannis
0
 
LVL 44

Assisted Solution

by:Rainer Jeschor
Rainer Jeschor earned 1000 total points
ID: 39175438
Hi.
the 10 is the base number format == decimal.
parseint(11,2) would be 3
0

Featured Post

Stack Overflow Podcast - Developer Story

Welcome to the Stack Overflow podcast recorded Thursday July 20 at Stack Overflow Headquearters in NYC. Your hosts today are podcast regulars Jay Hanlon, David Fullerton, and Ilana Yitzhaki, plus the quite irregular Matt Sherman (Stack Overflow Engineering Manager extraordinaire)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question