-
10 Sep 2010 1:34 PM #1
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
-
10 Sep 2010 11:13 PM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 43
- Answers
- 1
-
11 Sep 2010 1:58 PM #3
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
-
12 Sep 2010 6:29 AM #4Sencha - Ext JS Dev Team
- Join Date
- Mar 2007
- Location
- Notts/Redwood City
- Posts
- 30,459
- Vote Rating
- 18
- Answers
- 9
Set
When doing that.Code:Ext.DomHelper.useDom = true;
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
13 Sep 2010 2:08 AM #5
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
-
13 Sep 2010 3:41 AM #6Sencha - Ext JS Dev Team
- Join Date
- Mar 2007
- Location
- Notts/Redwood City
- Posts
- 30,459
- Vote Rating
- 18
- Answers
- 9
Doesn't it work then?
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
13 Sep 2010 12:39 PM #7
Unfortunately doesn't. Doesn't cause javascript error, but does nothing. I tried the following code:
Code:Ext.DomHelper.useDom =true;
Ext.DomHelper.append('country',[{tag:'option', cls:'some-class', html:'1', value:'1'},{tag:'option', cls:'some-class', html:'2', value:'2'}]);I just wanted to use homogeneous Ext core code, but instead now use option object this way:Code:var countryCombo = Ext.get('country');countryCombo.dom.options.add(new Option("1","1"));countryCombo.dom.options.add(new Option("2","2"));It works for both browsers.
Condor, i managed to reproduce the linked bug according to bug description in IE8. Unbelivable they couldn't repair it until now...
Thanks a lot both of you!
snemeth72
Similar Threads
-
Help with DomHelper.append function
By ljadrbln in forum Ext 3.x: Help & DiscussionReplies: 2Last Post: 28 Apr 2010, 12:34 PM -
Help with Ext.DomHelper.append
By msairam.28@gmail.com in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 4 Aug 2009, 8:43 AM -
DomHelper append stylesheet in IE
By zombeerose in forum Ext 3.x: Help & DiscussionReplies: 6Last Post: 9 Jul 2009, 8:06 AM -
DomHelper builds bad HTML for Select options in IE
By tryanDLS in forum Ext 1.x: BugsReplies: 8Last Post: 4 Jun 2008, 11:49 PM -
How to Ext.DomHelper.append ?
By kimu in forum Ext 1.x: Help & DiscussionReplies: 2Last Post: 25 Mar 2007, 8:22 AM


Reply With Quote