Results 1 to 3 of 3

Thread: Problem with application load (d is undefined error)

  1. #1
    Sencha User
    Join Date
    Feb 2010
    Posts
    4

    Default Problem with application load (d is undefined error)

    Hi,

    I developed some web application using extjs 3.1.0. but I have some issue. Some times when I load my application everything works fine and sometimes application crash. When application crash I'm getting following errors:

    Fist error message:

    d is undefined ext-all.js (line 7)

    followed by:

    uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLDivElement.appendChild]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: http://localhost/ext-3.1.0/ext-all.js :: anonymous :: line 7" data: no]


    I searched web for the solution but with no success!

    One more think my application works just in Firefox not in IE.

    Does anyone have a clue what could be the problem.

    Since the application consists of many separate js files I didn't give the code. I tried separate js file and it works fine. The application consists of Box layout filled by some grids and tree.

    Thank you!

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    This probably happens because Ext.onReady executes before it is supposed to. Are you using Ext from within a frame?

    You could try if the code from this feature request fixes the problem.

  3. #3
    Sencha User
    Join Date
    Feb 2010
    Posts
    4

    Default

    Quote Originally Posted by Condor View Post
    This probably happens because Ext.onReady executes before it is supposed to. Are you using Ext from within a frame?

    You could try if the code from this feature request fixes the problem.
    Thank you Condor for the quick reply!

    My index.html looks like:

    Code:
    !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Windy</title>
    <link rel="stylesheet" type="text/css" href="style.css"  />
    <link rel="stylesheet" type="text/css" href="../ext-3.1.0/resources/css/ext-all.css"/>
    <link rel="stylesheet" type="text/css" href="../ext-3.1.0/examples/ux/gridfilters/css/GridFilters.css" />
    <link rel="stylesheet" type="text/css" href="../ext-3.1.0/examples/ux/gridfilters/css/RangeMenu.css" />
    <link rel="stylesheet" type="text/css" href="../ext-3.1.0/examples/ux/css/RowEditor.css" />
    <link rel="stylesheet" type="text/css" href="../ext-3.1.0/examples/ux/css/GroupSummary.css" />
    
    <script type="text/javascript" src="../ext-3.1.0/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="../ext-3.1.0/ext-all.js"></script>
    <script type="text/javascript" src="../ext-3.1.0/examples/ux/gridfilters/menu/RangeMenu.js"></script>
    <script type="text/javascript" src="../ext-3.1.0/examples/ux/gridfilters/menu/ListMenu.js"></script>
        
    <script type="text/javascript" src="../ext-3.1.0/examples/ux/gridfilters/GridFilters.js"></script>
    <script type="text/javascript" src="../ext-3.1.0/examples/ux/gridfilters/filter/Filter.js"></script>
    <script type="text/javascript" src="../ext-3.1.0/examples/ux/gridfilters/filter/StringFilter.js"></script>
    <script type="text/javascript" src="../ext-3.1.0/examples/ux/gridfilters/filter/DateFilter.js"></script>
    <script type="text/javascript" src="../ext-3.1.0/examples/ux/gridfilters/filter/ListFilter.js"></script>
    <script type="text/javascript" src="../ext-3.1.0/examples/ux/gridfilters/filter/NumericFilter.js"></script>
    <script type="text/javascript" src="../ext-3.1.0/examples/ux/gridfilters/filter/BooleanFilter.js"></script>
    <script type="text/javascript" src="../ext-3.1.0/examples/ux/RowEditor.js"></script>
    <script type="text/javascript" src="../ext-3.1.0/examples/ux/GroupSummary.js"></script>
    
    
    
    <script type="text/javascript" src="items.js"></script>
    <script type="text/javascript" src="itemsView.js"></script>
    <script type="text/javascript" src="tree.js"></script>
    <script type="text/javascript" src="companies.js"></script>
    <script type="text/javascript" src="categories.js"></script>
    <script type="text/javascript" src="accounts.js"></script>
    <script type="text/javascript" src="projects.js"></script>
    <script type="text/javascript" src="bankAccounts.js"></script>
    <script type="text/javascript" src="exchangeRate.js"></script>
    <script type="text/javascript" src="invoices.js"></script>
    <script type="text/javascript" src="accruals.js"></script>
    <script type="text/javascript" src="cash_flow.js"></script>
    <script type="text/javascript" src="budgetMonths.js"></script>
    <script type="text/javascript" src="budget.js"></script>
    <script type="text/javascript" src="layout.js"></script>
    
    </head>
    <body>
            <div id="header"><h1>PS Wind Management</h1></div>
    
        
    </body>
    </html>
    and I have Ext.onReady function call from the last loaded js file "layout.js".

    layout.js looks like:

    Code:
    Ext.onReady(function(){
        Ext.QuickTips.init();
        
        var contentPanel = {
            id: 'content-panel',
            region: 'center', // this is what makes this panel into a region within the containing layout
            layout: 'card',
            margins: '2 5 5 0',
            activeItem: 0,
            border: true,
            items: [{
                id: 'start',
                html: ''
            }, CompaniesGrid, CategoriesGrid, ProjectsGrid, BankAccGrid, ExcRateGrid, AccountGrid, InvoicesGrid, AccrualGrid, budMonthGrid, BudgetGrid, CfGrid]
        };
    
        var viewport = new Ext.Viewport({
            layout: 'border',
            renderTo: Ext.getBody(),
            items: [{
                region: 'north',
                xtype: 'box',
                applyTo: 'header',
                height: 30
            },{
                region: 'west',
                xtype: 'panel',
                split: true,
                collapsible: true,
                collapseMode: 'mini',
                bodyStyle:'padding:5px;',
                minSize: 200,
                title: 'Navigation',
                width: 200,
                items: [tree]
                
            },
                contentPanel
            ]
        });
        
        var treeState = Ext.state.Manager.get("treestate");
        if (treeState)
        {
            tree.expandPath(treeState);
        }
        
        
        
    });
    I'm loading all necessary js files before I Ext.onReady! Could you please help on Ext.onReady modernization? How can I implement that in my code? I have read the thread but I didn't catch how can I implement that.


    Thank you very much for your help!


Posting Permissions

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