PDA

View Full Version : ExtJS Element object and appending data to the Element



Cyberangel67
19 Dec 2010, 2:55 PM
It appears that from what I can tell that ExtJS can't do something like this

Ext.get('myDiv').append('<li><a href="#">' + data + '</a>');

Is this by design or an oversight in its design?

hendricd
19 Dec 2010, 7:23 PM
Looks like Ext.Element::appendChild is what you seek ?

Might want to include the closing </li> tag in that string as well..

Cyberangel67
3 Jan 2011, 3:10 PM
I used this as an example, if I just want to append data that is not node/DOM related to a div/table cell or whatever there is no append.

Was this an oversight?

Rashid.softengg
21 Nov 2011, 4:33 AM
var str2 = '';
str2+='<tr id='+i+'>'+

'<td><input type="text" size="30" name="category['+i+'][name]" id="category_'+i+'name" class="categoryname"></td>'+
'<td><select name="category[ctype]" id="category_ctype"><option value="Context">Context</option><option value="Catagory">Catagory</option></select></td>'+
'<td><input type="button" size="20" value="Delete" id="delete_button"></td>'+
'</tr>';
i++;
Ext.DomHelper.append('category_fields', str2);