1. #1
    Ext User Skeleton's Avatar
    Join Date
    Mar 2007
    Location
    İstanbul
    Posts
    68
    Vote Rating
    0
    Skeleton is on a distinguished road

      0  

    Default IE7 does not fill the Grid (uses JSON)

    IE7 does not fill the Grid (uses JSON)


    I am trying to make a paging grid that uses JSON data model. It works very well on FF but not in IE7 (I have not tried on IE6 btw). I have extracted that part from the site, it is:

    http://www.in-spiretech.com/pub/yui/test/comments.php

    When you try to view that page in FF, it loads fine. But in IE7, it does not fill the grid with the data and the refresh button keeps rolling. As far as I can see from the Fiddler tool, the data via JSON is requested and returned successfully. Also I have tried to set debugger and debug using Visual Studio 2005, I have finally came to the following code in connection.js file (YUI 0.12.2) and keep looping there:

    Code:
    /* .... */
    
        handleReadyState:function(o, callback)
        {
    		var oConn = this;
    
    		if(callback && callback.timeout){
    			this._timeOut[o.tId] = window.setTimeout(function(){ oConn.abort(o, callback, true); }, callback.timeout);
    		}
    
    		this._poll[o.tId] = window.setInterval(
    			function(){
    				if(o.conn && o.conn.readyState == 4){
    					window.clearInterval(oConn._poll[o.tId]);
    					delete oConn._poll[o.tId];
    
    					if(callback && callback.timeout){
    						delete oConn._timeOut[o.tId];
    					}
    
    					oConn.handleTransactionResponse(o, callback);
    				}
    			}
    		,this._polling_interval);
        },
    
    /* .... */
    The loop executes the line if(o.conn && o.conn.readyState == 4) and keeps looping without entering the if statement. At that time the value of o.conn.readyState == 1.

    Is this a bug related to IE7 or am I missing something? Btw I have checked my code for any extra , left accidently at the end of object/array definitions Thanks for your help in advance.

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,496
    Vote Rating
    44
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    The ready state is never reaching 4?

    That's strange if Fiddler sees the response packet coming back correctly. The HTTP status is 200 is it?

    Have you tried running with connect-debug.js instead of connect.js?

    This logs exceptions detected in Connect methods rather than just swallowing them.

  3. #3
    Ext User Skeleton's Avatar
    Join Date
    Mar 2007
    Location
    İstanbul
    Posts
    68
    Vote Rating
    0
    Skeleton is on a distinguished road

      0  

    Default


    Finally I have figured out what the problem is (after putting dozens of debugger statements everywhere). It was the one of my renderer functions:

    Code:
    function rndComment(value, rowIndex, colIndex, td, dataModel) {
    	td.firstChild.style.setProperty('padding', '0', null);  /* THIS LINE */
    	return "<pre>" + value + "<\/pre>";
    }
    The first statement on the function was messing around in IE7. The strange thing is that FF does not say anything about this. The lesson I have got from this situation is that if you have an errornous statement in your renderer function, IE does not like that. Anyway thanks Animal for your attention.

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    That may be b/c IE and FF dom implementation of td.firstchild.style is different. If you set a BP in that fn does td.firstchild.style even exist in IE? Does td.firstchild even point to the same object in IE and FF?

  5. #5
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    IE's style object doesn't support setProperty.

  6. #6
    Ext User
    Join Date
    Mar 2007
    Posts
    7
    Vote Rating
    0
    TTrek is on a distinguished road

      0  

    Default


    hm, well.. i currently stuck at

    line 567 (ext-all-debug.js)
    var range = el.ownerDocument.createRange();

    I try to open LayoutDialog which has a Grid, but IE7 tells me an error. Debugging resulted the line 567... in ext-all-debug.js

  7. #7
    Ext User
    Join Date
    Mar 2007
    Posts
    7
    Vote Rating
    0
    TTrek is on a distinguished road

      0  

    Default


    in Alpha 2 it's line 249:
    var range = el.ownerDocument.createRange();

    does anyone have suggestions regarding this problem?

  8. #8
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,496
    Vote Rating
    44
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Stop there in your debugging tool, and see what "el" contains!

Similar Threads

  1. How to fill form in Dialog with values from JSON?
    By Arikon in forum Ext 1.x: Help & Discussion
    Replies: 5
    Last Post: 8 Jun 2012, 1:37 AM
  2. How-to: Looking for answers? Fill us up with info!
    By BernardChhun in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 6 Mar 2007, 4:47 AM
  3. how does the grid fill the entire panel area?
    By vupt in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 5 Mar 2007, 9:24 AM
  4. Help with fill combobox
    By marcelomello in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 26 Feb 2007, 5:01 PM
  5. Getting my table to fill the entire content panel
    By chubbard in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 8 Feb 2007, 8:39 PM

Thread Participants: 4