1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    44
    Answers
    4
    Vote Rating
    0
    nothing is an unknown quantity at this point

      0  

    Default Answered: Create new DIV and add to extisting DIV

    Answered: Create new DIV and add to extisting DIV


    I have tried all kinds of functions to create a new div and add it to my existing DOM div. Nothing works.

    My existing Div looks like this:
    Code:
    <div id="window.all.desktop.taskBar_tbar" class="TTaskBar_Entrys" style=""></div>

    1. Get the exisiting Div
    Code:
    oTaskbar = Ext.fly('window.all.desktop.taskBar_tbar');
    2. Create the new Div element
    Code:
    // Tried #1: Did this
    oTaskbar.createChild({tag: 'div', html: 'blabla'});
    
    // Tried #2: I also tried this like
    var div = new Ext.Element(document.createElement('div'));
    oTaskbar.createChild(div);
    
    // Tried #3: and even tried
    oTaskbar.appendChild("<div class='taskBar_EntryAct'>abc</div>");
    3. Do I have to update DOM to make the changes happen?

  2. Your option #1 worked fine for me when I tried it. Perhaps there is other javascript code that's interfering somehow?

  3. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,927
    Answers
    656
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    This is more of a JS question .. something like:

    document.createElement("div");

    You can then use renderTo to assign you component to the dev.

    Scott.

  4. #3
    Ext JS Premium Member burnnat's Avatar
    Join Date
    Jun 2011
    Posts
    416
    Answers
    42
    Vote Rating
    61
    burnnat is a jewel in the rough burnnat is a jewel in the rough burnnat is a jewel in the rough burnnat is a jewel in the rough

      0  

    Default


    Your option #1 worked fine for me when I tried it. Perhaps there is other javascript code that's interfering somehow?

  5. #4
    Sencha User
    Join Date
    Apr 2012
    Posts
    44
    Answers
    4
    Vote Rating
    0
    nothing is an unknown quantity at this point

      0  

    Default


    Indeed it worked. There is another framework deleting stuff in the div later on. I cant believe it. Thanks.

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi