1. #1
    Sencha Premium Member
    Join Date
    Nov 2013
    Posts
    17
    Vote Rating
    0
    rolzan is on a distinguished road

      0  

    Question Unanswered: Add a sencha button to a HTML element

    Unanswered: Add a sencha button to a HTML element


    Hello,

    i am retrieving HTML via JSON, this HTML is shown in a detailCard of a nested List:
    Code:
    detailCard.setHtml(... ....)
    In the retrieved HTML there is a div:
    HTML Code:
    <div id="ColorButtonContainer">
    Is it possible to add a sencha button to this div?

    I have created a sencha button:
    Code:
    var colorButton = Ext.create('Ext.Button', {
        id: 'colorButton',
        text: 'Paint it !!!',
        handler: function () {
            Ext.Ajax.request({
                
                url: 'http://10.14.10.36/gdlibrary/scripts/paintit.php',
                data: 'Bild1=resources/images/..... . . . . .',
                //defaultHeaders : 'application/json',
                method: 'POST',
                success: function(xhr) {
                    var response = Ext.decode(xhr.responseText);
                    console.dir(response);
                }
            });
        }
    });
    But how to add this button to the div element?

    Thanks in advance
    Best regards
    Rolf

  2. #2
    Sencha Premium Member
    Join Date
    Nov 2013
    Posts
    17
    Vote Rating
    0
    rolzan is on a distinguished road

      0  

    Question


    I have tried the get method - but Ext.get("ColorButtonContainer") is null.

  3. #3
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    3,867
    Answers
    325
    Vote Rating
    127
    fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all fmoseley is a name known to all

      0  

    Default


    Use the button renderTo config and render it to the div
    http://docs.sencha.com/touch/2.3.1/#...t-cfg-renderTo
    Get more personalized support via a support subscription.

    Want to learn Sencha Touch 2? Check out
    Sencha training
    Sencha Touch in Action

    Need more help with your app? Hire Sencha Services services@sencha.com

    When posting code, please use BBCode's CODE tags.

    Need to include a test case use:
    The official Sencha Fiddle

Thread Participants: 1

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