Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8352709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:02:29+00:00 2026-06-09T09:02:29+00:00

There is a button, when i click that there will be a call to

  • 0

There is a button, when i click that there will be a call to the Server, and i will get a JSON response.

This JSON response will contain a string similar to

{
    "value": "Success",
    "information": {
        "firstName": "kei",
        "surname": "chan"
    }
}

The value field in the JSON will be either SUCCESS or FAIL. So if it is success, i will have to navigate to another view and display the firstName and surname.

I will need to pass the values firstName and lastName to the other view if so.

How can i pass the values of firstName and lastName in senchaTouch/cordova ?

Code:

the button

xtype:'button',
                   id:'when_button_click',
                   text:'Send',
                   ui:'confirm',

Controller class

extend: "Ext.app.Controller",
                  config: {
                  refs: {
                  newNoteBtn: "#when_button_click"
                  },
                  control: {
                  newNoteBtn: {
                  tap: "onNewNote"
                  }
                  }
                  },
                  onNewNote: function () {
 var values = Ext.getCmp('form').getValues();
                 console.log("inside onNewNote function");

       Ext.Ajax.request({
                        url: 'http://call.com/the_webservice',
                        params : values,

                        failure: function (response) {
                        var text = response.responseText;
                         console.log("fail");

                        },                              success: function (response) {
                        var text = response.responseText;
                         console.log("success");

                        }

                        });



                  }

                  // init and launch functions omitted.
                  });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T09:02:31+00:00Added an answer on June 9, 2026 at 9:02 am

    You can simply add additional properties into the new View object that the controller is creating. For example if the controller handler function is “pushing” a new view like so

    this.getSomeView().push({   
       xtype : 'mylistView',
       prop1 : 'my property to pass',
       prop2 : record.get('comesFromTheEventHandled')
    });
    

    Then the view can access these properties in the initialize() function.
    For the code sample — in the “mylistView” initialize() section you access these properties as

    this.prop1 and this.prop2
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there ASP button that won't submit post form data. Whenever I click an
I have a button that when pressed, will call the company. Now, I was
I have a javascript function. On-click will call this. Using document.getElementById I am getting
Is there a way to hookup a button click to a method programmatically? It
in my application a link button is there when i click on it it
I am trying to click a button with Perl Mechanize, but there are some
In my app there is a button, user just click it then the latest
Is there an event when I click the X button?
Is there a way to capture the Click event of a Button from the
I attach a click handler to a button on my page. Is there anyway

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.