1. #1
    Ext User
    Join Date
    Jul 2008
    Posts
    10
    Vote Rating
    0
    695w is on a distinguished road

      0  

    Red face Unanswered: mistake in Ext.Template?

    Unanswered: mistake in Ext.Template?


    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.

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Answers
    1
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    1. IE doesn't support adding select options through DOM manipulation (you'll have to create Option instances and add() them to the options property, see here).

    2. from() only works if your template doesn't contain text that gets corrupted by the browser. It's recommended to use a TEXTAREA as the root element, because browsers don't corrupt a TEXTAREA value.

  3. #3
    Ext User
    Join Date
    Jul 2008
    Posts
    10
    Vote Rating
    0
    695w is on a distinguished road

      0  

    Default


    thank you!

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar