Hybrid View

  1. #1
    Ext User
    Join Date
    Jun 2010
    Posts
    4
    Vote Rating
    0
    snemeth72 is on a distinguished road

      0  

    Default Unanswered: DomHelper.append failed on IE if add options to select

    Unanswered: DomHelper.append failed on IE if add options to select


    Hi!

    I try to add options to an empty select with DomHelper.append and insertFirst, but it faild in IE. The same code works in FF.
    HTML Code:
    <select id="country">
    <option value="-1" selected="selected">Loading country list...</option>
    </select>
    Code:
    Ext.DomHelper.append('country',[
    
    
    {tag:'option', cls:'some-class', html:'1', value:'1'},
    {tag:'option', cls:'some-class', html:'2', value:'2'} ] );
    It worked in both browser only if i rebuild the whole select with options as cn: attribute.
    Code:
    Ext.DomHelper.append('tdiv',{ tag:'select', cls:'some-class', name:'country', value:'1', cn:[ {tag:'option', html:'One', value:'1'},
    {tag:'option', html:'Two', value:'2'}, {tag:'option', html:'Three', value:'3'}, {tag:'option', html:'Four', value:'4'} ] } );
    Other DomHelper operations worked in both browser (add li to ul; add p to div;...) only options failed in IE.

    Do i use it wrong way? Is it possible to add options to (almost) empty select?

    Thanks!

    snemeth72

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Answers
    1
    Vote Rating
    91
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    It's a bug in Internet Explorer (the other way to add options is to add new Option objects).

  3. #3
    Ext User
    Join Date
    Jun 2010
    Posts
    4
    Vote Rating
    0
    snemeth72 is on a distinguished road

      0  

    Default


    Hi Condor,

    meny thanks for quick replay! You are right, i forget to mention the IE version i use. It's IE 8. The bug you linked said that applies to IE 5-5.5. Do you think it's bug is in the product in v8, and not repaired yet?

    OK, i'll use new option object!

    Thanks again!

    snemeth72

  4. #4
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,505
    Answers
    13
    Vote Rating
    53
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Set

    Code:
    Ext.DomHelper.useDom  = true;
    When doing that.

  5. #5
    Ext User
    Join Date
    Jun 2010
    Posts
    4
    Vote Rating
    0
    snemeth72 is on a distinguished road

      0  

    Default


    As far as i see this public property (useDom) is in the 3.2.1 ExtJS but not in ExtCore 3.0. Maybe do you know when new version of Ext core (with this property) is planned to release?

    Thanks!

    s

  6. #6
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,505
    Answers
    13
    Vote Rating
    53
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Doesn't it work then?

Similar Threads

  1. Help with DomHelper.append function
    By ljadrbln in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 28 Apr 2010, 12:34 PM
  2. Help with Ext.DomHelper.append
    By msairam.28@gmail.com in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 4 Aug 2009, 8:43 AM
  3. DomHelper append stylesheet in IE
    By zombeerose in forum Ext 3.x: Help & Discussion
    Replies: 6
    Last Post: 9 Jul 2009, 8:06 AM
  4. DomHelper builds bad HTML for Select options in IE
    By tryanDLS in forum Ext 1.x: Bugs
    Replies: 8
    Last Post: 4 Jun 2008, 11:49 PM
  5. How to Ext.DomHelper.append ?
    By kimu in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 25 Mar 2007, 8:22 AM

Thread Participants: 2