1. #1
    Sencha Premium Member
    Join Date
    Nov 2013
    Posts
    16
    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
    16
    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
    2,912
    Answers
    224
    Vote Rating
    89
    fmoseley is just really nice fmoseley is just really nice fmoseley is just really nice fmoseley is just really nice fmoseley is just really nice

      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

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