1. #1
    Sencha User
    Join Date
    Jun 2007
    Posts
    13
    Vote Rating
    0
    lucassus is on a distinguished road

      0  

    Default IE7 problem ('this.container' is null or not an object)

    IE7 problem ('this.container' is null or not an object)


    I've spend several hours on trying fix this problem and I still didn't find the solution :/

    Everything works fine in Firefox, but in IE7 and Opera 9 I receive this error:
    Line 236 (ext-all.js)
    'this.container' is null or not an object


    I've tried use different versions of the Ext (currently I'm using ext-1.1-beta2).

    After a long investigation I found that problem occurs in this part of code:
    PHP Code:
    grid = new Ext.grid.EditorGrid(
                
    'product-grid',
                
    //parent.document.getElementById('product-grid'), - I also tried this method.. doesn't work
                
    {
                    
    dsdataSource,
                    
    cmgetColumnModel(),
                    
    selModel: new Ext.grid.RowSelectionModel({singleSelecttrue}),
                    
    //autoExpandColumn: 'Nazwa produktu',
                    
    enableColLockfalse,
                    
    loadMasktrue
                
    }
            ); 
    Grid is being created in "bootstrap" which looks like:
    PHP Code:
    var ProductGridUI = function() {

    // code for building complete grid, menus, etc.

           
    return {
            
    init: function() {
                
    buildGrid();
            }
        }

    }

    Ext.onReady(ProductGridUI.initProductGridUItrue); 
    Here is html code for the grid:
    PHP Code:
    <div style="width:100%;" class="x-box-blue">

        <
    div class="x-box-tl">
            <
    div class="x-box-tr">
                <
    div class="x-box-tc">
                </
    div>
            </
    div>
        </
    div>

        <
    div class="x-box-ml">
            <
    div class="x-box-mr">
                <
    div class="x-box-mc">
                    <
    div id="product-grid" style="border:1px solid #99bbe8; overflow: hidden; width: 100%; height: 360px;">
                    </
    div>
                </
    div>
            </
    div>
        </
    div>

        <
    div class="x-box-bl">
            <
    div class="x-box-br">
                <
    div class="x-box-bc">
                </
    div>
            </
    div>
        </
    div>

    </
    div
    Thanks for help!

  2. #2
    Sencha User
    Join Date
    Jun 2007
    Posts
    13
    Vote Rating
    0
    lucassus is on a distinguished road

      0  

    Default


    Hi!
    I almost find the bug in my code.

    When I encompass grid div with this code, IE (and Opera) returns error ('this.container' is null or not an object).
    The html code:
    [PHP]
    <!-- Category grid { --!>
    <div class="x-box-blue" style="width: 829px;">
    <div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc">
    </div></div></div>

    <div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc">
    <h3 style="margin-bottom: 5px; text-align: center;">Katagorie produkt

  3. #3
    Sencha User
    Join Date
    Jun 2007
    Posts
    13
    Vote Rating
    0
    lucassus is on a distinguished road

      0  

    Default


    wooohoo !!
    I've found..

    The problem occurs when I encompass grid divs with this comment:
    PHP Code:
    <!-- Category grid { --!>

    <
    div>
    grid here
    </div>

    <!-- } 
    Category grid --!> 
    Very weird. Why IE and Opera behaves in this way?

  4. #4
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    23
    Vote Rating
    0
    RobbyRacoon is on a distinguished road

      0  

    Default


    Quote Originally Posted by lucassus View Post
    Very weird. Why IE and Opera behaves in this way?
    I wish I knew, but I think that you just showed me why some code I had a couple weeks ago was crashing. I ended up rewriting the whole page, and in the process removed some similar comments. Maybe I had the same problem and never knew it, and just fixed it "by accident"?

Thread Participants: 1