Hybrid View

  1. #1
    Ext User
    Join Date
    Dec 2007
    Posts
    3
    Vote Rating
    0
    noelito is on a distinguished road

      0  

    Default [2.0][CLOSED] Ext.get/Ext.getDom does not fix IE's document.getElementById bug

    [2.0][CLOSED] Ext.get/Ext.getDom does not fix IE's document.getElementById bug


    I ran into a problem with my code today and found it to be one of IE's many bugs. In IE, the document.getElementById function returns by the name of an element before it looks for the id of an element. I was using Ext.get in my code and found the same bug. I would think that it should be something that Ext would remove since an IE bug should not alter how Ext works. I hope that this could be fixed.

    Here is an example:

    HTML 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" xml:lang="en-us" lang="en-us">
        <head>
            <title>Ext getElementById bug</title>
            <meta http-equiv="Content-Language" content="en-us" />
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
            <meta http-equiv="Content-Script-Type" content="text/javascript" />
            <meta name="description" content="This is the HEAD's description meta tag." />
            <link media="all" rel="stylesheet" href="/scripts/ext-2.0/resources/css/ext-all.css" type="text/css" />
        </head>
        <body>
            <form action="ext-ext.bug.html" method="post">
                <div>
                    <input type="text" size="50" id="description" name="description" value="This is the FORM's description input field." />
                    <button type="button" id="go" name="go" value="True">Go!</button>
                </div>
            </form>
            
            <script type="text/javascript" src="/scripts/ext-2.0/adapter/ext/ext-base.js"></script>
            <script type="text/javascript" src="/scripts/ext-2.0/ext-all.js"></script>
            <script type="text/javascript">
            //<![CDATA[
                Ext.onReady(function () {
                    Ext.get('go').on('click', function () {
                        var el = Ext.get('description');
                        var domEl = el.dom;
                        
                        if (domEl.tagName === 'INPUT') {
                            alert(domEl.value);
                        } else if (domEl.tagName === 'META') {
                            alert(domEl.getAttribute('content'));
                        }
                    });
                });
            //]]>
            </script>
        </body>
    </html>
    Last edited by noelito; 14 Apr 2008 at 10:16 AM. Reason: typo

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

      0  

    Default


    This isn't a bug in Ext - it's a bug in IE.

    IMO, there is no reason every call to getDom() or get() should be slowed (could have terrible performance effect) to workaround an IE bug when there is a much better workaround available - if you need to use get(), getDom or document.getElementById then use a unique (to names too) ID.
    Jack Slocum
    Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum
    jack@extjs.com

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi