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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:19:20+00:00 2026-05-22T12:19:20+00:00

Like a window in microsoft OS (xp,vista, 7 etc)… If a main window create

  • 0

Like a window in microsoft OS (xp,vista, 7 etc)…

If a main window create a modal window, the user can’t access the main window,
(including close and access the toolbar etc).

I want to make a similar one with extjs. This is my modal example :

Ext.create("Ext.Window", {
    title: 'aa',
    width: 200,
    height: 150,
    html: 'a',
    tbar: [{
        text: 'aa',
        handler: function() {
            Ext.create("Ext.Window", {
                title: 'aa',
                width: 150,
                closable: false,
                height: 100,
                html: 'b',
                ownerCt: this,
                modal: true
            }).show();
        }
    }]
}).show();

The problem is, it just disable the main window’s body, user still can access main toolbar, also for closing it.

My question is how to make full modal ? or if it can’t be done, how to disable main window, if modal window is appear, I have use listener show on modal win, but the problem is i cant access main window from this listener.

Edit :

This is my code so far :

Ext.create("Ext.Window", {
    title: 'aa',
    width: 200,
    height: 150,
    html: 'a',
    maskOnDisable: false,
    tbar: [{
        text: 'aa',
        handler: function(a) {
            var parent = a.up("window");
            parent.disable();
            Ext.create("Ext.Window", {
                title: 'aa',
                width: 150,
                height: 100,
                html: 'b',
                listeners: {
                    scope: this,
                    "close": function() {
                        parent.enable();
                    },
                    /*
                    "blur" : function(){
                        this.focus()
                    }
                    */
                }
            }).show();
        }
    }]
}).show();

Although this is not modal concept, but it seem like what I want now, I have new problem, maskOnDisable is not works and I need an event like blur, so if user click parent window, it focus back to popup window.
(should I post it as new question ?)

  • 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-22T12:19:21+00:00Added an answer on May 22, 2026 at 12:19 pm

    New Answer:

    Have you tried to disable() and enable() the parent window appropriately? I think that should help you in stopping access to the first window and at the same time allowing your user to access the main application menu and screen. Here is what I tried:

    var x = Ext.create("Ext.Window",{
        title : 'aa',
        width : 200,
        height: 150,
        html : 'a',
        tbar : [{
            text : 'aa' ,
            handler :function(){
                // I disable the parent window.
                x.disable();
    
                Ext.create("Ext.Window",{                   
                    title : 'aa',
                    width : 150,
                    closable : false,
                    height: 100,
                    html : 'b'
                    // You will need to enable the parent window in close handler of this window.
    
                }).show();
            }
        }]
    }).show();
    

    When you disable the window, the components within the window are disabled and you will not be able to even move the window. But at the same time, you will have access to other components like your main menu, grids on the page. You will also have access to the new window. Now, to make it behave like a modal, you need to enable the parent window when you close the child window. You can make use of the enable() method for that.

    I cannot think of any other way to achieve what you are looking for.


    Old Answer:

    I wonder why you have set the ownerCt property referring to the window itself! That is your main problem. By removing the property you will achieve what you are looking for. Here is the updated code:

    Ext.create("Ext.Window",{
        title : 'Extra window!',
        width : 150,                            
        height: 100,
        closable : false,                           
        html : 'A window that is a modal!',                         
        modal : true
    }).show();
    

    Was there any reason in setting the ownerCt property?

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

Sidebar

Related Questions

My XAML code is like this: <Window xmlns ='http://schemas.microsoft.com/netfx/2007/xaml/presentation' xmlns:x ='http://schemas.microsoft.com/winfx/2006/xaml' Title ='Print Preview
I want to a create dialog box like window before displaying the console window.
I think my title was informative enough. :) I close the child window like
At Microsoft I can download the Windows Symbol Packages for XP, Vista, Server, even
I have a WPF Window defined in XAML like this: <Window x:Class=com.some.company.window xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml
Hi i have a xaml code like this <Window xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml x:Class=test.Window1 x:Name=Window Title=Window1
I have a simple Window that looks like this: <Window x:Class=StackOverflowExample.MainWindow xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml Title=MainWindow
I want to do something like this: <Window x:Class=WpfApplication10.MainWindow xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml Title=MainWindow Height=350 Width=525>
Say I have a user control like this: <UserControl x:Class=StyleTest.UserControl1 xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml xmlns:mc=http://schemas.openxmlformats.org/markup-compatibility/2006 xmlns:d=http://schemas.microsoft.com/expression/blend/2008
I have a XML code like this: <?xml version=1.0 encoding=utf-8 ?> <Window xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml>

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.