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

x
?
Solved

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

Posted on 2013-06-21
4
Medium Priority
?
367 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
[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
4 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 39267734
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 2000 total points
ID: 39267975
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
ID: 39268004
Yeah, I was not near a real computer.
0
 

Author Closing Comment

by:smfmetro10
ID: 39272242
Thank You So Much!
0

Featured Post

Quick Start: DOCKER

Sometimes you just need a Quick Start on a topic in order to begin using it.. this is just what you need to know to get up and running with Docker!

Question has a verified solution.

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

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
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…
Suggested Courses

722 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