Results 1 to 3 of 3

Thread: Setting html inside a panel from a function

  1. #1
    Sencha User
    Join Date
    Nov 2011
    Location
    India
    Posts
    25
    Vote Rating
    0
      0  

    Default Setting html inside a panel from a function

    <code>
    var panel = new Ext.form.FormPanel({

    xtype: 'fieldset',
    id: 'tweetFieldset',
    title: 'Tweet Reply',
    items:[{
    items: [{
    id: 'tweetMessage',
    xtype: 'panel',
    html: "tweet"
    }, {
    xtype: 'textareafield',
    name: 'tweetReply',
    }]
    }, {
    items: [{
    id: 'replyTweetButton',
    xtype: 'button',
    width:'150',
    ui: 'confirm-round',
    text: 'Reply',
    handler: this.onTweetReply,
    scope: this
    }]
    }]

    });
    </code>

    I want to change the html value of the tweetMessage panel from a function. I m trying to do
    Ext.getCmp('tweet').setValue('new tweet');
    But it does not works.

    Any suggestions

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    What field has the id 'tweet'? If you want to put html inside a panel then use update() on the panel.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Nov 2011
    Location
    India
    Posts
    25
    Vote Rating
    0
      0  

    Default

    Thanks, it works.

    Sencha Rocks!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •