Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7908765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:05:27+00:00 2026-06-03T12:05:27+00:00

This program should check whether the value of getTotalCount() is greater thana a number

  • 0

This program should check whether the value of getTotalCount() is greater thana a number (for example10) and display the alert window if it is.

My problem is how to assign a value of getTotalCount() to a variable.

var Store = new Ext.data.Store({
        id: 'ID_Store',
        proxy: new Ext.data.HttpProxy({
                url: 'get.php',      
                method: 'POST'
            }),
        baseParams:{task: "LIST"}, 
        reader: new Ext.data.JsonReader({   
                    root: 'results',
                    totalProperty: 'total',
                    id: 'id'
                },[ 
                    {name: 'IDclass', type: 'int', mapping: 'id_class'},
                    {name: 'Class', type: 'string', mapping: 'class'}
                ])
    });


Store.load;
var total_num = Store.getTotalCount();

if(total_num > 10){
    alert("greater than 10");
}

JSON is:

{success:true}{total:23,results:[{"id_class":"1","class":"V-1"},{"id_class":"2","class":"V-2"},{"id_class":"3","class":"V-3"},{"id_class":"4","class":"V-4"},{"id_class":"5","class":"V-5"},{"id_class":"6","class":"VI-1"},{"id_class":"7","class":"VI-2"},{"id_class":"8","class":"VI-3"},{"id_class":"9","class":"VI-4"},{"id_class":"10","class":"VI-5"},{"id_class":"11","class":"VII-1"},{"id_class":"12","class":"VII-2"},{"id_class":"13","class":"VII-3"},{"id_class":"14","class":"VII-4"},{"id_class":"15","class":"VII-5"},{"id_class":"16","class":"VIII-1"},{"id_class":"17","class":"VIII-2"},{"id_class":"18","class":"VIII-3"},{"id_class":"19","class":"VIII-4"},{"id_class":"20","class":"VIII-5"}]}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T12:05:29+00:00Added an answer on June 3, 2026 at 12:05 pm

    Replace end of your sample with:

    Store.on('load', function() {
    
      var total_num = Store.getTotalCount();
    
      if(total_num > 10){
         alert("greater than 10"); 
      }
    
    }, this, { single: true });
    Store.load();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This program should calculate the value of 2^1+2^2 + ... + 2^10: #include <stdio.h>
I have this program that should execute a piece of code base on the
I am working on a bug in this program where it should be able
Edited Question: This should be clear. using System; namespace UpdateDateTimeFields { class Program {
I write a program to verify this website: www.alipay.com which root CA cert should
Dear all,Now i have this question in my java program,I think it should be
This program stores pairs in a map, counting the number of times a word
My program should be able to work this way. Below is the content of
// Write a program to check whether or not two arrays are identical in
I am writing a program/script that should check what services are running on a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.