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 6254513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:11:33+00:00 2026-05-24T14:11:33+00:00

Firstly, here is my code: Ext.Msg.show({ title: ‘Username’, msg: ‘Please enter your username’, buttons:

  • 0

Firstly, here is my code:

Ext.Msg.show({
    title: 'Username',
    msg: 'Please enter your username',
    buttons: Ext.MessageBox.OKCANCEL,
    prompt:{ maxlength : 180, autocapitalize : false },
    modal: true,
    fn: function(buttonId, text) {
        console.log("OK ("+text+"), what is you password?");
        if (buttonId == 'ok')
        {
            Ext.Msg.show({
                title: 'Password',
                msg: 'Please enter your password',
                buttons: Ext.MessageBox.OKCANCEL,
                prompt:{ maxlength : 180, autocapitalize : false },
                modal: true,
                fn: function(buttonId2, text2) {
                    if (buttonId == 'ok')
                    {
                        console.log("OK ("+text+", "+text2+"), attempting login..");
                    }
                },
                icon: Ext.MessageBox.INFO
            });
        }
    },
    icon: Ext.MessageBox.INFO
});

My problem is that when I press OK on the first messagebox, the second one appears for less then a second and then closes too, without me pressing OK on the second messagebox.

Ideally, of course, I’d display both username and password inputs in the same Messagebox, but I can’t figure out how to do this.

All help appreciated!

  • 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-05-24T14:11:34+00:00Added an answer on May 24, 2026 at 2:11 pm

    The static show method on Ext.Msg that you are calling basically reconfigures the previous MessageBox and so is getting confused when hiding and showing again.

    You should create a new instance of the Ext.MessageBox class and call the show method of that object so it will use independent instances.

    var msg = new Ext.MessageBox().show({
        title: 'Username',
        msg: 'Please enter your username',
        buttons: Ext.MessageBox.OKCANCEL,
        prompt:{ maxlength : 180, autocapitalize : false },
        modal: true,
        fn: function(buttonId, text) {
            console.log("OK ("+text+"), what is you password?");
            if (buttonId == 'ok')
            {
                var msg2 = new Ext.MessageBox().show({
                    title: 'Password',
                    msg: 'Please enter your password',
                    buttons: Ext.MessageBox.OKCANCEL,
                    prompt:{ maxlength : 180, autocapitalize : false },
                    modal: true,
                    fn: function(buttonId2, text2) {
                        if (buttonId == 'ok')
                        {
                            console.log("OK ("+text+", "+text2+"), attempting login..");
                        }
                    },
                    icon: Ext.MessageBox.INFO
                });
            }
        },
        icon: Ext.MessageBox.INFO
    });
    

    Although this works, I would recommend you make a custom form panel containing both the fields and collect the information that way.

    Hope this helps.
    Stuart

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Firstly, thanks for your help. Here's my situation: I'm trying to edit the code
Firstly, here's my script: #!/usr/bin/python import sys, os sys.path.append('/home/username/python') sys.path.append(/home/username/python/flup) sys.path.append(/home/username/python/django) # more path
firstly, here's my code SELECT dbo.tblPat.pID, dbo.tblRec.rID, right(rPCheck, LEN(rPCheck) - (CHARINDEX('|', rPCheck))) as pCheck,
Firstly here is my PHP CODE if(!isset($_POST['selection'])){ $missing['selection'] = $required['selection']; } if(empty($missing)) { post2session();
Firstly here is the code that im trying to get to work- private: System::Void
So firstly here's my query: ( NOTE:I know SELECT * is bad practice I
I am inserting a list item using sharepoint web services.... Here is my code:
Firstly here is the problem: A positive integer is called a palindrome if its
Here is a piece of code that I use to fetch a web page
I'm having a rough time here with Resque, firstly, in development when running rake

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.