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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:42:00+00:00 2026-06-18T07:42:00+00:00

So I think I maybe missing something with Ext.Ajax.request(); So I have code that

  • 0

So I think I maybe missing something with Ext.Ajax.request();

So I have code that does the following:

Ext.Ajax.request({
   url : 'myurl',
   success : function(){
     alert('success 1');   
   },
   callback : function(){
     alert('callback');
   }

});

Then later I make another ajax call like this:

Ext.Ajax.request({
   url : 'myurl',
   success : function(){
     alert('success 2');   
   }

});

If i don’t define a callback function the old one from the first call is still set. So when it runs it still calls the old callback function defined earlier. So I add listeners to the

Ext.Ajax.on('beforerequest', function(c, o, e){
     //The options has all my previous options
});

So I put a break point in here and looked at the options, and if on my second call or any other ajax call after do not override callback or any other options with an emptyFunction() or any other request config the previous values stays. So if on my second call I didn’t redefine the success function the first calls success function would still be there. Is there a way to clear all previous options, on the next call? I could just clear them on each new call. But I don’t understand why if the calls are unrelated my options from the last call remain?

  • 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-18T07:42:01+00:00Added an answer on June 18, 2026 at 7:42 am

    As the docs states, Ext.Ajax is a singleton.

    If you look at its code, you’ll see the the option config will remain between calls.

    So I’m afraid to say that you are using it the wrong way. Ideally, you should define what happens upon success or failure with each call.

    It does appear though that this will work:

    var iAjax = new Ext.data.Connection();
    iAjax.request({
        // unique config here.
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's a recurrent problem that I have and I think maybe CDI events can
I don't think it's possible but maybe I'm missing something. I would like to
I think the answer is no, but maybe I'm missing something: in most repos,
Does anyone know off a way or maybe think its possible to connect Node.js
Maybe my memory has gone completely wacko, but I think I remember that declaring
I think this may be relatively straight forward. I have a rewrite rule that
I have some code for drawing polygons edges that is supposed to draw, for
It seems I'm missing something with Java Generics because something I think is simple,
I think I may be using a wrong window style or something or maybe
I am completely new to Kendo UI, so maybe I missing something, but after

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.