Solved

How do you get and show the total count from a json call

Posted on 2013-06-21
4
351 Views
Last Modified: 2013-06-24
Hi,

I have some javascript that scrapes a youtube channel and displays the videos on a webapage.  It displays 9 at a time with a "show more videos button.

 Is it possible to have a total count so there could be a display that read something like "showing 1-9 out of 50" then when the user hit the "load more" button it would read "showing 1-18 out of 50"?

I have included the code for better clarification and you can see the working copy at:
http://thelocalized.com/fancybox/
 
Thanks!
index.html
0
Comment
Question by:smfmetro10
  • 2
4 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
Comment Utility
If the api provides that number the answer is yes. So you need to look in the documentation  or look at the returned Json if they already include it
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
Comment Utility
data.feed.openSearch$totalResults.$t return the global nbumber of feeds

Test page : http://jsfiddle.net/X2Fea/2/
0
 
LVL 75

Expert Comment

by:Michel Plungjan
Comment Utility
Yeah, I was not near a real computer.
0
 

Author Closing Comment

by:smfmetro10
Comment Utility
Thank You So Much!
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now