1. #1
    Sencha User
    Join Date
    Jan 2013
    Posts
    20
    Vote Rating
    0
    venkateshwar is on a distinguished road

      0  

    Default Answered: How to set html to a element in extjs

    Answered: How to set html to a element in extjs


    1) How to set `HTML` to already created panel or any other Element?


    I am a beginner. I tried the below to set some content inside the HTML

    Code:
        var clickedElement = Ext.getCmp('id').el.child('>');
        clickedElement.setHTML("hello");

    The above is working fine but the problem is that as the panel has many div's inside it.. the above approach is erasing those inside html (i.e div's).


    I saw through Chrome that the panel has three nested div's. So, if I want to add HTML to it then I need to give something like below:


    Code:
    var clickedElement = Ext.getCmp('id').el.child('>').child('>');  //two times child

    When I tried the above approach, I am successfully adding the html content and also the div's doesn't remove. Here the problem is that, I can't see the added content (maybe because of some default stylings, I can see the content is being added in Chrome console though.)


    I am just asking whether there is any efficient way of adding HTML to the panel. In my opinion, this should be very easy approach which I am complexing here.


    2) How to check whether a Element has a particular child ?


    Suppose, for example, If I add a extjs Button as a child into my panel while creating it. (which I can do). How to check whether the panel has the particular element (i.e button here)?


    Before asking here, I searched alot and found somewhat relative but not helpful link to my problem.


  2. #2

  3. #3
    Sencha User
    Join Date
    Jan 2013
    Posts
    20
    Vote Rating
    0
    venkateshwar is on a distinguished road

      0  

    Default


    Thanks for these links. I will go through them.

Thread Participants: 1

Tags for this Thread

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