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

  • Home
  • SEARCH
  • 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 7859419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T21:54:17+00:00 2026-06-02T21:54:17+00:00

1.) I need to add 2 buttons, one below another. My working so far

  • 0

1.) I need to add 2 buttons, one below another. My working so far is demonstrated below; It only shows one button, but how can i add another button with a different button image below this button ?

2.) When the user clicks a button, i need to navigate to another screen. How can i do this ?
I need the equivalent of the following objective-c code ?

View1 *view1 = [[View1 alloc] initWithNibName:@"View1" bundle:nil];
            [self.navigationController pushViewController:View1 animated:YES];

3.) How can i add a navigation Bar (equivalent to the navigation bar shown in iPhone)

The code for the 1st question;

{
                items:[
                    {
                        xtype:'button',
                        text: 'Submit',
                        ui:'confirm',
                        handler: function(){
                          var values = Ext.getCmp('contactForm').getValues();

                          Ext.Ajax.request({

                            url: 'http://loonghd.com/service/',

                            failure: function (response) {
 //do something
            },                              success: function (response) {
                                                                         // do something
                            }

                           });
                        }
                    }
                ]

            }
  • 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-02T21:54:18+00:00Added an answer on June 2, 2026 at 9:54 pm

    1) For getting two buttons one below the other, you can add two separate buttons (with different ui property) as childs of a form panel. I think, this is what you need.

    Just like this,

       ....
       ....
       items : [
           {
             xtype:'button',
             text: 'Submit',
             ui:'confirm', // makes the button color as green
             handler: function(){
                var values = Ext.getCmp('contactForm').getValues();
                Ext.Ajax.request({
                     url: 'http://loonghd.com/service/',
                     failure: function (response) {
                            //do something
                      },
    
                     success: function (response) {
                             // do something
                     }
                });
               }
              },
              {
                  xtype:'button',
                  text:'Second button',
                  ui:'decline', // makes the button color as red.
                  listeners : {
                      tap : function() {
                         Ext.Msg.alert('You just clicked Second button');
                      }
                   } 
               } 
      ]
      ....
      ....
    

    2) 3) For your 2nd and 3rd question, navigationview is the solution.
    Solution posted by M-x is great, but it’s very advanced level example & also difficult to understand at first instance.

    Here’s an easy solution of navigatioview from Sencha Docs.

    //create the navigation view and add it into the Ext.Viewport
    var view = Ext.Viewport.add({
        xtype: 'navigationview',
    
        //we only give it one item by default, which will be the only item in the 'stack' when it loads
        items: [
            {
                //items can have titles
                title: 'Navigation View',
                padding: 10,
    
                //inside this first item we are going to add a button
                items: [
                    {
                        xtype: 'button',
                        text: 'Push another view!',
                        handler: function() {
                            //when someone taps this button, it will push another view into stack
                            view.push({
                                //this one also has a title
                                title: 'Second View',
                                padding: 10,
    
                                //once again, this view has one button
                                items: [
                                    {
                                        xtype: 'button',
                                        text: 'Pop this view!',
                                        handler: function() {
                                            //and when you press this button, it will pop the current view (this) out of the stack
                                            view.pop();
                                        }
                                    }
                                ]
                            });
                        }
                    }
                ]
            }
        ]
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a way to add or remove a row below another row in
I making a custom button, and I need to add a PreviewKeyDown event, whenever
I'm new in c#. I need to add a Find_Click button which has the
I need to position this update button on www.euroworker.no/order (you'll have to add an
I need to add css height to each page dynamically with jQuery. So far
In My application i need to open one dialog. And on press of button
I need a JQuery or Javascript plugin that do the functionality like demonstrated below.
I need to add linked buttons in the code-behind based on a DataSet that
I need the functionality of AWT Frames for one component, but my main application
In my project I need to create some play,pause,stop buttons in one composite. For

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.