695w
23 Oct 2009, 10:12 PM
1. the method append does not work in ie when i append a "option" tag to a "select" tag
append( Mixed el, Object/Array values, [Boolean returnElement] )
var tpl=new Ext.Template('<option value="{value}"> {text}</option>');
tpl.append("the select tag id",{value:'a',text:'b'});
2.sometime the template created by method Template.from does not work
eg:
html:
<div id="target_el">
</div>
<div style="display:none">
<div id='tpl'> <a href="{href}" title="{title}"> {text}</a></div>
</div>
javascript:
var str='<a href="{href}" title="{title}"> {text}</a>';
var tpl_=new Template(str);
var tpl =Ext.Template.from('tpl');
tpl_.append("target_el",{href:'a.jsp',title:'test',text:'aaaaa'});
tpl.append("target_el",{href:'a.jsp',title:'test',text:'aaaaa'});
result:
<div id="target_el">
<a href="a.jsp" title="test"> aaaaa</a>
<a href="{href}" title="test"> aaaaa</a>
</div>
forgive me and my poor english.
append( Mixed el, Object/Array values, [Boolean returnElement] )
var tpl=new Ext.Template('<option value="{value}"> {text}</option>');
tpl.append("the select tag id",{value:'a',text:'b'});
2.sometime the template created by method Template.from does not work
eg:
html:
<div id="target_el">
</div>
<div style="display:none">
<div id='tpl'> <a href="{href}" title="{title}"> {text}</a></div>
</div>
javascript:
var str='<a href="{href}" title="{title}"> {text}</a>';
var tpl_=new Template(str);
var tpl =Ext.Template.from('tpl');
tpl_.append("target_el",{href:'a.jsp',title:'test',text:'aaaaa'});
tpl.append("target_el",{href:'a.jsp',title:'test',text:'aaaaa'});
result:
<div id="target_el">
<a href="a.jsp" title="test"> aaaaa</a>
<a href="{href}" title="test"> aaaaa</a>
</div>
forgive me and my poor english.