1. #1
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,361
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default YAHOO.ext.DomHelper backwards?!

    YAHOO.ext.DomHelper backwards?!


    Code:
    	var TreeDivs = {
    			tag: 'div',
    			id: 'TestDiv',
    			html: 'Parent1',
    			children: [{
    				tag: 'div',
    				id: 'TreeDiv1',
    				cls: '',
    				html: 'Child 1',
    				children: [{ 
    					tag: 'div',
    					id: 'PPTree',	
    					html: 'Child 1 Child'
    					}] 
    			}]
    	};
    dh.overwrite('centerData', TreeDivs);
    Results in
    Code:
    {div id="centerData"}
    	{div id="TestDiv"}
    		{div class="" id="TreeDiv1"}
    			{div id="PPTree"}Child 1 Child{/div}
    		{/div}
    	{/div}
    {/div}
    But in the browser, looks backwards:
    Child 1 Child
    Child 1
    Parent1

    what gives?

    (substituted < for { ,etc)

  2. #2
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,361
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    early bump

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

      0  

    Default


    The order of the attributes is not important. Using html and children is not really supported but if you do do it it results in the children being created and then the html being appended. html is the innerHTML for the element, and innerHTML would include children. If you need to maintain the order, try wrapping the text in a span and creating as a child.

  4. #4
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,361
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    Jew da man

    the order does matter because the "PPTree" div is a Tree that i need to create. The parent nodes are "under" it w/out the span tags, which makes it strange.

    Thanks so much. But it still is backwards. oh well.

  5. #5
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,361
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    Eh, i *think* i know why this is happening.
    it seems that the child is before the text of the html.

    but... i look in the code (domhelper.js) and can't support my theory.

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

      0  

    Default


    In DomHelper it builds the children into a string and appends the String. Then if an html attribute exists, it appends that.

Similar Threads

  1. YAHOO.ext.View and DomHelper.Template
    By ericd in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 4 Feb 2007, 4:37 AM
  2. YAHOO.extend() versus YAHOO.extendX()
    By griffiti93 in forum Community Discussion
    Replies: 2
    Last Post: 2 Feb 2007, 3:55 PM
  3. YAHOO.ext.BorderLayout && YAHOO.ext.ContentPanel
    By wos in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 13 Dec 2006, 6:14 AM
  4. DomHelper id
    By zquirm in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 29 Nov 2006, 3:14 PM
  5. Sort order backwards??
    By tryanDLS in forum Ext 1.x: Bugs
    Replies: 8
    Last Post: 10 Nov 2006, 7:27 AM

Thread Participants: 1