-
25 Mar 2007 5:46 AM #1
How to Ext.DomHelper.append ?
How to Ext.DomHelper.append ?
I want to use Ext.DomHelper.append, but I'm not able to use it. This is my code:
Everything goes well with this code. If I try to do the same with Ext.DomHelper.append I obtain nothing. This is my code, what is wrong with this?:Code:rules = Ext.util.JSON.decode(o.responseText); var ruleSelect = document.getElementById('validation-rule') for(var i = 0, limit = rules.length; i < limit; i++){ opt = document.createElement('option'); opt.value = rules[i]; opt.innerHTML = rules[i]; ruleSelect.appendChild(opt); }
Thanks for your helpCode:rules = Ext.util.JSON.decode(o.responseText); for(var i = 0, limit = rules.length; i < limit; i++){ Ext.DomHelper.append('validation-rule',{ tag:'option', value:rules[i], html:rules[i] }); }
-
25 Mar 2007 6:59 AM #2
On IE? IE's addition of options elements is flaky. McSoft eh? Who'd a thunk it?
Try adding
Ext.DomHelper.useDom = true;
before your call to append the option.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
-
25 Mar 2007 8:22 AM #3
Thanks Animal,
with
Ext.DomHelper.useDom = true
works perfectly also on IE
Bye
Similar Threads
-
DOMHelper in IE?
By kjordan in forum Ext 1.x: BugsReplies: 2Last Post: 29 Jan 2007, 7:40 AM -
DomHelper
By INeedADip in forum Ext 1.x: BugsReplies: 6Last Post: 2 Jan 2007, 6:08 AM -
Template.append doesn't seem to be returning anything, ever
By sheynkman in forum Ext 1.x: BugsReplies: 8Last Post: 23 Dec 2006, 2:19 PM -
DomHelper
By INeedADip in forum Ext 1.x: Help & DiscussionReplies: 1Last Post: 18 Oct 2006, 2:25 AM


Reply With Quote