Results 1 to 2 of 2

Thread: How to Bind the result of the Ajax Call to the Label

  1. #1
    Sencha User
    Join Date
    Apr 2016
    Posts
    4

    Default How to Bind the result of the Ajax Call to the Label

    Hi Everyone,

    Hope you all are doing good.

    I needed little help, I have done one Ajax call in my form, which returns a string. I want to bind this string as a Text of my label.

    Code of Ajax call:

    myrequest: Ext.Ajax.request({
    url: 'outage/ShowBanner',
    method: 'POST',
    callback: function (success) {
    if (success) {
    var a = success.callback.arguments[2].responseText;
    }
    }
    }),

    Code of Label:

    {
    xtype: 'label',
    bodyStyle: 'background-color: transparent;',
    cls: 'x-form-item scroll-left',
    text: "",
    name: 'lblOutage',
    id: 'CDBAdmin.lblOutage'
    },

    I tried calling a Label in Ajax callback function using its Id but it didn't work, Used following lines:
    var Label = Ext.getCmp('CDBAdmin.lblOutage');
    Label.setText(a);

    Thanks in advance.

    Regards,
    Rohan

  2. #2

Similar Threads

  1. Binding JSON result to Label.
    By RKenkre in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 3 May 2016, 7:39 AM
  2. display the result from RPC call in content panel
    By KimIronChef in forum Ext GWT: Help & Discussion (1.x)
    Replies: 0
    Last Post: 15 Mar 2010, 11:37 AM
  3. How to process ajax call result + Tree
    By iliakan in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 15 Aug 2007, 12:13 PM

Tags for this Thread

Posting Permissions

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