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 8898123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:31:50+00:00 2026-06-15T00:31:50+00:00

this.getSecondPanel = function(argPanel, argID) { Ext.Ajax.request({ url : ‘myActionURL’, params : {id: argID}, success

  • 0
this.getSecondPanel = function(argPanel, argID)
{
    Ext.Ajax.request({
        url     : 'myActionURL',
        params  : {id: argID}, 
        success : function(response)
        {
            var resData = Ext.util.JSON.decode(response.responseText);
            var totalCount = resData.totalCount;

            argPanel.items.insert(0, this.getTotalCountPanel(totalCount));
        },
        failure : function(response)
        {
            Ext.Msg.alert('Error: ', response);
        }
    }); 
};

this.getTotalCountPanel = function(argCounter) 
{
    return new Ext.Panel({
        title   : 'Summary Panel',
        html    : '<table class="bgrGREYlight" width="100%" style="padding:5">' +
                    '<tbody>' +
                        '<tr>' +
                            '<th align="left" width="20%" class="tableTEXT2">' + Total Count + '</th>' +
                            '<td  width="80%" align="left" class="tableTEXT">' + argCounter + '</td>' +
                        '</tr>' +
                    '</tbody>' +
                  '</table>'
    });
};

when I run above code, it gives

TypeError: this.getTotalCountPanel is not a function

error. I guess it is a scope problem. How can I fix this error?

  • 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-15T00:31:52+00:00Added an answer on June 15, 2026 at 12:31 am

    Yes you can set scope: this in the request method options object.
    http://docs.sencha.com/ext-js/4-1/#!/api/Ext.Ajax-method-request

    this.getSecondPanel = function(argPanel, argID)
    {
        Ext.Ajax.request({
            scope:this,  //<-----  scope set to current context
            url     : 'myActionURL',
            params  : {id: argID}, 
            success : function(response)
            {
                var resData = Ext.util.JSON.decode(response.responseText);
                var totalCount = resData.totalCount;
    
                argPanel.items.insert(0, this.getTotalCountPanel(totalCount));
            },
            failure : function(response)
            {
                Ext.Msg.alert('Error: ', response);
            }
        }); 
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my code: $.ajax({ url: someUrl, type: PUT, data: { id: id, message:
This works. $(document).ready(function(){ $(.items article).click(function(){ window.location=$(this).find(a).attr(href); return false; }); }); However , when the
This works: Baseline Controller @search = Baseline.search(params[:search]) @baselines = @search.paginate :page => params[:page], :per_page
This link describes a function on a Money object for adding funds together of
This url structure is proposed for SEO optimization. So suggesting another structure will not
This onclick function: VVi.$row['id']..onclick = function() { alert('1'); var ResultI = '.$row['id'].'; location.href='visuals.php?ResultI=' +
This is a newbie request. I'm looking for materials on .dll creation. Specifially, i
This is what I tried to do ten times today without success: make a
This is the page URL http://domain.com/testphp?id=1&mview=4 The choices are displayed from the table named
this is my first question in here, and I would like to ask if

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.