Results 1 to 3 of 3

Thread: Element not available in onReady in IE7

  1. #1
    Ext User
    Join Date
    Sep 2007
    Location
    Melbourne, Australia
    Posts
    35

    Question Element not available in onReady in IE7

    Hi,

    I am a bit confused and stuck with this problem. The code is as simple as that:
    PHP Code:
    Ext.onReady(function(){
        
    alert(document.getElementById('myContainer'));
    }); 
    The HTML has "myContainer" DIV with some content in it.
    But I can see message box with "null" in IE7 (which is unexpected) and the valid element in FF3.
    I tried to localise the problem but it does work in smaller samples. It doesn't on the real page (which is too large and bloated to post here).

    Could you please give a suggestion where I should dig and what might be the cause of this issue?

    At least any ideas or thought, please.

    Thanks in advance,
    Dmitriy.

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258

    Default

    There's a bug that causes onReady not to work correctly in some situations, see: http://extjs.com/forum/showthread.ph...hlight=onReady
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  3. #3
    Ext User
    Join Date
    Sep 2007
    Location
    Melbourne, Australia
    Posts
    35

    Default

    Hi,

    Thank you very much for the help. I would hardly ever figure this bug.
    I tried to apply patches but I probably missed something and it didn't work.
    I'm not very advanced JS developer, so I decided to use defer for now and hopefyly the time spceified will be enough for IE to load the content.
    PHP Code:
    Ext.onReady(function(){
        
    performInit.defer(2000this);
    }); 
    Thanks one more time for the help.
    Dmitriy.

Posting Permissions

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