1. #391
    Sencha Premium Member
    Join Date
    Mar 2010
    Location
    Brighton
    Posts
    16
    Vote Rating
    0
    hyponym is on a distinguished road

      0  

    Default Repeated requests fail in IE9 (after 10+ reqs)

    Repeated requests fail in IE9 (after 10+ reqs)


    I am getting serious problems in IE9 (Ext 3.4.0) when calling a function repeatedly.

    I set up a test that makes a total of 150 requests at 20 second intervals
    using unique ids in the postData obj.

    The jsonp responses work fine in ie7/8 but fall over every time in IE9 around the 11th request

    Code:
    function xdmRequest(aUrl, postData) {
    	Ext.Ajax.request({
            url: aUrl,
            method: 'POST',
            params : postData,
            timeout : 15000,
            isJSON  : true,
    	proxied : true
        });
    }
    
    function xdmResult(options,success,response){
    	console.log('received response from server: ' + response);
    }
    I can see all the requests coming back from the server (using Fiddler2 to log the traffic) so it seems to be failing to execute the return function somewhere.
    Last edited by hyponym; 12 Jul 2011 at 4:33 AM. Reason: omitted fiddler traffic verification

  2. #392
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    Quote Originally Posted by hyponym View Post
    I am getting serious problems in IE9 (Ext 3.4.0) when calling a function repeatedly.

    I set up a test that makes a total of 150 requests at 20 second intervals
    using unique ids in the postData obj.

    The jsonp responses work fine in ie7/8 but fall over every time in IE9 around the 11th request

    Code:
    function xdmRequest(aUrl, postData) {
    	Ext.Ajax.request({
            url: aUrl,
            method: 'POST',
            params : postData,
            timeout : 15000,
            isJSON  : true,
    	proxied : true
        });
    }
    
    function xdmResult(options,success,response){
    	console.log('received response from server: ' + response);
    }
    I can see all the requests coming back from the server (using Fiddler2 to log the traffic) so it seems to be failing to execute the return function somewhere.
    @hyponym --

    Can you post your request 'loop' used for the test case?
    "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.


  3. #393
    Sencha Premium Member
    Join Date
    Mar 2010
    Location
    Brighton
    Posts
    16
    Vote Rating
    0
    hyponym is on a distinguished road

      0  

    Default


    Sure, pm me if you want to use my actual url

    Code:
    var postcount = 0;
    var globalInterval;
    
    function loopedPost(){
    	testPost();
    	var f = function () {testPost(); };
    	globalInterval = setInterval(f,2000);		
    }
    
    function testPost(){	
    	postcount += 1;
    	if (postcount > 150){
    		postcount = 0;
    		clearInterval(globalInterval);
    		return;
    	}
    	
    	var postobj = {			
    		url 	: '',
    		params 	: {json: 1, key : "keyvalue", id : postcount }
    	};
    	xdmRequest(postobj);
    }

    On the server (not the entire function):
    Code:
    function testReturn(){
    	$id = $_REQUEST['id'];
            $returnArray = array('dummyval'=>'999', 'id'=>$id);
            $retval = json_encode($returnArray);
            echo 'xdmResult(0, 1, ' . $retval . ');';
    }

  4. #394
    Sencha User
    Join Date
    Aug 2010
    Posts
    34
    Vote Rating
    0
    aratcliffe is on a distinguished road

      0  

    Default Global listeners for $JIT?

    Global listeners for $JIT?


    I'd like to be able to setup global beforeload and complete listeners so that I can notify the user that the UI is loading. Is this possible?

    Cheers
    Adam

  5. #395
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    Quote Originally Posted by aratcliffe View Post
    I'd like to be able to setup global beforeload and complete listeners so that I can notify the user that the UI is loading. Is this possible?

    Cheers
    Adam
    @Adam,

    First the first part -- no.
    The framework must be loaded first in order to use any events.

    For Ext 2, the Ext libs must be loaded in the <head> section. Create the necessary markup (your spinner, etc) in the <body> tag, and remove it when Ext.onReady callback is raised.
    "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. #396
    Sencha User
    Join Date
    Aug 2011
    Posts
    5
    Vote Rating
    0
    jaufgang is on a distinguished road

      0  

    Exclamation


    In ext-basex, in the declaration for ext.capabilities.hasAudio, the line
    Code:
    aAudio = ('Audio' in window) ? new Audio('') : {},
    can in some cases cause the browser to execute an http request. In a web page that has a <base href="http://something"> tag in its head, the call to
    Code:
    new Audio('')
    will try to initialize the audio object by loading from the base url.

    I noticed this while working on a web app of mine, the Net panel in firebug was showing an extra, unnecessary http request during each page load that didn't seem to be caused by anything I put in my page. It was only a minor annoyance, not a major bug, but it was irritating me that I couldn't figure out where it was coming from. Eventually, through elimination and stepwise debugging I eventually tracked the problem down to this line of code.

    Fortunately, it seems to be possible to fix this problem by simply calling
    Code:
    new Audio()
    without an empty string parameter.

    Cheers!

  7. #397
    Sencha User
    Join Date
    Aug 2010
    Posts
    34
    Vote Rating
    0
    aratcliffe is on a distinguished road

      0  

    Default


    @Doug,

    Thanks for the reply. What I'm referring to by UI is a UI component loaded by $JIT - so Ext and $JIT will be loaded at the point at which I load the module. An example of this in my application is a preferences dialog that is lazily loaded as a $JIT module.

  8. #398
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    Quote Originally Posted by jaufgang View Post
    ..
    I noticed this while working on a web app of mine, the Net panel in firebug was showing an extra, unnecessary http request during each page load that didn't seem to be caused by anything I put in my page. It was only a minor annoyance, not a major bug, but it was irritating me that I couldn't figure out where it was coming from. Eventually, through elimination and stepwise debugging I eventually tracked the problem down to this line of code.

    Fortunately, it seems to be possible to fix this problem by simply calling
    Code:
    new Audio()
    without an empty string parameter.

    Cheers!
    @jaufgang -- Nice digging on that one!

    We've noticed similar behavior in Ext 4.x feature detection as well. We'll be looking at this one a bit closer.

    Thanks Again.
    "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.


  9. #399
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    Quote Originally Posted by aratcliffe View Post
    @Doug,

    Thanks for the reply. What I'm referring to by UI is a UI component loaded by $JIT - so Ext and $JIT will be loaded at the point at which I load the module. An example of this in my application is a preferences dialog that is lazily loaded as a $JIT module.
    @Adam,

    $JIT supports multiple inline callbacks in the request chain(s). You could simply inject them to create 'progress bars' or other visual aids to indicate such activity as each module is loaded:

    Code:
    $JIT(
      function(){  showMessage('Loading..);  },
      'assets/cls/preferences.js',
       function(ok){ 
        if(ok) {
          showMessage('Initalizing'); 
          new ns.cls.Preferences().show();
       }
     },
      ....
    );
    "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.


  10. #400
    Sencha User
    Join Date
    Jul 2009
    Posts
    12
    Vote Rating
    0
    Henrik Rutzou is on a distinguished road

      0  

    Default


    Hi,

    I have 3 remote combo's with initial field values where the value in combo 1 must be passed as a parameter for the combo 2 etc.

    I'm on Ext JS 3.3.0

    I'm trying to delay the AJAX call with baseX but async : false dosn't seem to have any effect.

    In the same page I also uses Ext.Ajax.request and here the async : false is working fine.

    Is that correct ?

    Code:
    ,store              : new Ext.data.JsonStore({
        url                : "/pextrpcali/XAREG_CR.pgm"
        ,async             : false
        ,baseParams:{
            ses            : "21054531730886540020111111271173"
            ,req           : "14629009920882312020111140191292"
            ,func          : "getRows"
            ,valueField    : "EHXAID"
            ,displayField  : "select"
            ,filterId1     : ""
            ,filterId2     : ""
            ,filterId3     : ""
            ,filterId4     : ""
            ,filterId5     : ""
            ,filterId6     : ""
            ,filterId7     : ""
            ,filterId8     : ""
            ,filterId9     : ""
        }
        ,listeners: {
            beforeload: { 
                fn:function(store, options) {
                    options.params.filterId1 = pxGetExtValueDelayed(panelId + "EHXXID", 1000);
                    options.params.filterId2 = pxGetExtValueDelayed(panelId + "EHXJID", 1000);
    
    
                }
            }    
        }
    })
    ,valueParam         : "value"
    ,mode               : "remote"
    ,editable           : true
    ,forceSelection     : true
    ,hiddenName         : "EHXAID"
    ,valueField         : "EHXAID"
    ,displayField       : "select"
    ,triggerAction      : "all"
    PS. pxGetExtValueDelayed is a "dirty workaround" to make the beforelistener to wait:



    Regards,
    Henrik

Thread Participants: 82

  1. galdaka (1 Post)
  2. Digital God (3 Posts)
  3. prophet (1 Post)
  4. alayasf (2 Posts)
  5. tof (1 Post)
  6. stever (3 Posts)
  7. mystix (4 Posts)
  8. fangzhouxing (6 Posts)
  9. ludoo (1 Post)
  10. KRavEN (4 Posts)
  11. DigitalSkyline (3 Posts)
  12. daemach (1 Post)
  13. violinista (1 Post)
  14. mlarese (1 Post)
  15. walker_cn (4 Posts)
  16. stevebla (4 Posts)
  17. Chris in Cambridge (1 Post)
  18. mjlecomte (2 Posts)
  19. ZooKeeper (10 Posts)
  20. brookd (1 Post)
  21. fermo111 (6 Posts)
  22. kevinwu8 (1 Post)
  23. Spirit (3 Posts)
  24. jerrybrown5 (4 Posts)
  25. lvanderree (8 Posts)
  26. Makor (4 Posts)
  27. yanick (1 Post)
  28. wm003 (10 Posts)
  29. radio1 (3 Posts)
  30. jphillips (2 Posts)
  31. markpele (2 Posts)
  32. Romantik (1 Post)
  33. Sander_S (4 Posts)
  34. maximumcoder (2 Posts)
  35. NotChris (6 Posts)
  36. ritchrs (2 Posts)
  37. sksoft (2 Posts)
  38. jvanantwerp (2 Posts)
  39. jfa (2 Posts)
  40. BlueCamel (1 Post)
  41. ClemsonJeeper (3 Posts)
  42. sp797 (1 Post)
  43. mahesh122 (2 Posts)
  44. zombeerose (12 Posts)
  45. jlowe (2 Posts)
  46. bt_bruno (2 Posts)
  47. pompom (4 Posts)
  48. Eric24 (18 Posts)
  49. baumschule (3 Posts)
  50. coderobo (3 Posts)
  51. krause (1 Post)
  52. mubenchi (1 Post)
  53. mrkadakia (3 Posts)
  54. tomim (4 Posts)
  55. canxss (2 Posts)
  56. tasman (3 Posts)
  57. mrsunshine (4 Posts)
  58. Trinad (2 Posts)
  59. jasonb885 (2 Posts)
  60. wki01 (5 Posts)
  61. mschwartz (2 Posts)
  62. sarathy (2 Posts)
  63. jdurante (1 Post)
  64. TomChiverton (1 Post)
  65. sumit.madan (2 Posts)
  66. Riemi (4 Posts)
  67. Henrik Rutzou (3 Posts)
  68. hairinwind (1 Post)
  69. gzlizp (1 Post)
  70. yuanqixun (2 Posts)
  71. larryaubstore (2 Posts)
  72. wupeng (2 Posts)
  73. blueram (1 Post)
  74. ronivcp (1 Post)
  75. t00bs (2 Posts)
  76. hyponym (4 Posts)
  77. mg2468 (3 Posts)
  78. scaddenp (1 Post)
  79. faith wins (3 Posts)
  80. aratcliffe (8 Posts)
  81. jhashe (3 Posts)
  82. jaufgang (1 Post)

Tags for this Thread