1. #11
    Ext User
    Join Date
    Mar 2007
    Posts
    36
    Vote Rating
    0
    kovtik is on a distinguished road

      0  

    Default


    Add it to what? The child or the parent?
    To the parent. I want to receive the following html code:
    Code:
    <div id="panel">link</div>

  2. #12
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    I think I understand - you want to insert raw HTML into the node without destroying the children?

    You can do this with DomHelper.

    Code:
    var panel = document.getElementById('panel');
    var linkTemplate = new YAHOO.ext.DomHelper.Template('{0}');
    linkTemplate.compile();
    var elem = linkTemplate.overwrite(panel, ['link']);
    var onClick = function(){alert('test');}
    YAHOO.ext.EventManager.addListener(elem, 'click', onClick);
    YAHOO.ext.DomHelper.insertHtml('beforeEnd', panel, '');

  3. #13
    Ext User
    Join Date
    Mar 2007
    Posts
    36
    Vote Rating
    0
    kovtik is on a distinguished road

      0  

    Default


    I think I understand...
    You are cool, Jack. Thank you very much.

Similar Threads

  1. YAHOO.ext.Element and addListener
    By alex1er in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 18 Feb 2007, 2:57 AM
  2. YAHOO.ext.Element.get
    By jclawson in forum Ext 1.x: Bugs
    Replies: 2
    Last Post: 7 Feb 2007, 10:04 AM
  3. YAHOO.ext.Element Display
    By ojintoad in forum Ext 1.x: Help & Discussion
    Replies: 6
    Last Post: 1 Jan 2007, 2:20 AM
  4. Updating YAHOO.ext.Element update
    By scottw in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 14 Dec 2006, 6:32 AM

Thread Participants: 1