[CLOSED] [1.0] getBody() Error In IE8

  1. #1

    [CLOSED] [1.0] getBody() Error In IE8

    Hello,

    I am using the Ext.NET 1.0 SVN Build (last fetched on 12/10/2010) and I am now having issues with the getBody() function of the Ext.Panel override.

    I am using some custom code (overrides on the TabPanel) that allows me to essentially map keys to tab ID's. The reason being that when a given tabbed window is in a certain mode (modes can be: query, edit, view etc) it has a certain ID however because you can't change the actual ID of the panel/component we use a map to map changing ID's to a fixed tab ID. I hope that makes sense.

    This has been working fine in all browsers with the old build of 1.0 we were using. This old build used the following getBody() function:

    
        getBody : function () {
            if (this.iframe) {
                return this.iframe.dom.contentWindow;
            }
    
            return Ext.get(this.id + "_Content") || this.body;
        },
    However, the new version, which indexes window[] doesn't work. It seems that in Firefox and Chrome the 'this.iframe.dom.id' is something like 73552384_IFrame and so we can index window["73552384_IFrame"]. However, in IE8 we can't index window[] using that. I have noticed that I can however do window["73552384"]. Therefore an error is thrown on self.focus() because 'self' is undefined.

    I have attached the code I am using to this post which is a cut down version of my fuller project. I don't know as this is necessarily a bug in the Ext.NET framework because it all works fine without my extra code, however, before getBody() changed, it did work fine.

    I have removed the Ext DLLs from my attachment due to size, the latest SVN ones should cause the problem I am seeing to happen.

    Any help would be great thank you.
    Attached Files
    Last edited by Daniil; Oct 14, 2010 at 5:46 PM. Reason: [CLOSED]
  2. #2
    Hi rcaunt,

    We think the error is caused by the "id" string starting with an integer. This is an invalid "id".

    Within your generateRandom function, can you add an alpha prefix to "id", such as...

    return "id_" + Math.floor...
    Hope this helps.
    Geoffrey McGill
    Founder
  3. #3
    That has worked perfectly.

    Thank you! - Great help as always :)

Similar Threads

  1. Replies: 2
    Last Post: May 08, 2012, 3:34 PM
  2. Replies: 17
    Last Post: Oct 12, 2011, 4:54 PM
  3. Replies: 4
    Last Post: Jan 25, 2011, 10:39 AM
  4. [CLOSED] Panel.getBody problem
    By tdracz in forum 1.x Legacy Premium Help
    Replies: 12
    Last Post: Oct 19, 2010, 11:51 AM
  5. Replies: 2
    Last Post: Jul 29, 2009, 1:57 PM

Posting Permissions