Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: Ext.Ajax Communication Failure

  1. #11
    Sencha Premium Member
    Join Date
    Aug 2007
    Posts
    38

    Default Concurrent Ajax Request

    Thanks eveyone for trying to help me with this...

    I have found what is causing the issue - concurrent Ajax requests (and I guess associated event handling)

    As I explained in my first post I have some combo boxes which are populated by Ajax requests. I then have a "fetch" link or button to fetch some report, based on the values of the combo boxes, again using Ajax.

    If I click quickly an invoke the Ajax fetch before the Ajax combo update is complete all hell breaks loose - the browser completely breaks. I'm even unable to make a regular http request. I have to clear all cached content and cookies before the browser starts working again. (Browsers are IE7 and Firefox.)

    Any comments.

  2. #12
    Ext User halkon_polako's Avatar
    Join Date
    Nov 2007
    Location
    Barcelona
    Posts
    193

    Default

    If you need to do a 'fetch' link/button to do some report based on values of the combo boxes, you need to wait until the combo boxes updates correctly.
    You can put some variable in your application indicating that the combo is not on a correct state and avoiding to do the 'fetch'. That variable can be reseted on the load event from the combo, and then you could do that additional request (to do the report).

  3. #13
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    Or add your own custom event to your combo, and have the next fetch hang off that.

  4. #14
    Sencha Premium Member
    Join Date
    Aug 2007
    Posts
    38

    Default Concurrent Ajax Requests

    I undestand I should improve my code, but why do concurrent Ajax requests kill the browser? They are allowed.

  5. #15
    Sencha User hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,966

    Default

    IE permits 2 concurrent XHR requests, whereas Mozilla allows 4 (by default).
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  6. #16
    Sencha Premium Member
    Join Date
    Aug 2007
    Posts
    38

    Default Broken DOM and Event

    Thanks all for your help.

    My conclusion to all of this is that with me trying to get too clever with the Ext event model I was probably updating the DOM concurrently. This broke the DOM and caused all kinds of bad things to happen.

    I have cleaned up my code and things are working better.

  7. #17
    Sencha Premium Member
    Join Date
    Aug 2007
    Posts
    38

    Default Cookies are the issue

    Well I thought I had things figured out...

    I can now say for sure that cookies are causing the issue.

    I use:
    1. Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
    2. I then use the simple get set methods to save and retrieve cookies.
    3. I do save json data to cookies (like the json data for the store used by the combo boxes)

    If I remove the state/cookie code the application works fine.
    With the cookie code it works for a while then the browser breaks - I have to clear the browser cache (cookies, cached pages etc.) before the browser starts working again.

    Anyone have any ideas? Are there issues/limitations with storing json cookies?

    In the mean time I'm going to try this http://www.lalit.org/lab/jsoncookies/ and see what happens.

  8. #18

    Exclamation Communication failure problem/ Please help!

    Hello! i have an error after that executing code like this:

    var conn = new Ext.data.Connection({
    url: '<some_url>',
    timeout: 30000000
    });

    conn.request({
    success: function(resp, opt)
    {
    <some_work>
    },
    failure: function(resp, opt)
    {
    try
    {
    g_btn.enable();
    }
    catch (e) { }

    store_rep.each(function(el)
    {
    if (el.data.status == '????????????...')
    {
    el.set('status', '??????');
    el.commit();

    write_log('*** ?????? ??? ???????????? ?????? "' + el.data.title + '" ? ??????????? ' + el.data.param + '.');
    write_log('*** ' + resp.status);
    write_log('*** ' + resp.statusText);
    write_log('*** ' + resp.responseText);
    write_log_sep();
    }
    });

    build_rep(g_rid, g_btn);
    },
    params:
    {
    rid: rec.data.rid,
    id: rec.data.id,
    data: rec.data.param
    }
    });

    if request is executed = 60 minutes - then raised failure:
    response.status = 0
    response.statusText = 'communication failure'.

    Why this error getting after 60 minutes??
    How to avoid this situation??
    This Problem exists only in IE. somebody knows why?

    Thanks!!!

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •