-
29 Sep 2009 8:50 AM #1
Ext.append
Ext.append
Ext.DomHelper.append('player-list', {tag: 'tr', cls: 'player', children: ({tag: 'td', cls: 'status ' + status}, {tag: 'td', cls: 'rank', html: '<img src=\''+ webRoot +'image/rank/'+ players[plyr].rank +'.png\' alt=\''+ players[plyr].rankName +'\'>'})
});
Obviously I am screwing this up pretty hardcore, however I am trying to add multiple children at once. Can someone please tell me the correct way?
-
29 Sep 2009 8:52 AM #2
You specify arrays with [], not ().
Code:Ext.DomHelper.append('player-list', {tag: 'tr', cls: 'player', children: [{tag: 'td', cls: 'status ' + status}, {tag: 'td', cls: 'rank', html: '<img src=\''+ webRoot +'image/rank/'+ players[plyr].rank +'.png\' alt=\''+ players[plyr].rankName +'\'>'}] });Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
29 Sep 2009 8:53 AM #3


Reply With Quote