1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    8
    Vote Rating
    0
    kohhy is on a distinguished road

      0  

    Default Unanswered: Ext.window.MessageBox.alert is naver shown as modal.

    Hi,

    I use Ext.window.MessageBox.alert() as alternative of JavaScript's native alert(), but one problem is exist.

    If there are some parallel work in WebApp and it shows own window, the window shows above alert window.
    Is there any way to show Ext.window.MessageBox.alert() always modal?

  2. #2
    Sencha Premium Member vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Cluj, Romania
    Posts
    679
    Vote Rating
    49
    Answers
    23
    vadimv has a spectacular aura about vadimv has a spectacular aura about vadimv has a spectacular aura about

      0  

    Default

    Use show not alert then, with the config of alert plus modal config set to true
    Code:
        alert: function(cfg, msg, fn, scope) {       
                   if (Ext.isString(cfg)) {            
                                cfg = {                
                                     title : cfg,               
                                     msg : msg,               
                                    buttons: this.OK,                
                                    fn: fn,               
                                    scope : scope,                
                                    minWidth: this.minWidth,                
                                    modal: true            
                               };       
                     }       
     return this.show(cfg);    },
    Github https://github.com/vadimpopa
    Sencha tips and articles : http://vadimpopa.com
    Twitter: @vadimvpopa

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    8
    Vote Rating
    0
    kohhy is on a distinguished road

      0  

    Default

    It not works...

    Maybe what I want is difficult cause JavaScript is non-blocking language.
    I decide to use native (blocking) messagebox instead of ExtJS's one.

  4. #4
    Sencha Premium Member vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Cluj, Romania
    Posts
    679
    Vote Rating
    49
    Answers
    23
    vadimv has a spectacular aura about vadimv has a spectacular aura about vadimv has a spectacular aura about

      0  

    Default

    I answered to your question, even if alert is by default modal. BUT reading again what you are trying to achieve, I suggest you to play with z-index, and probably with the zindex manager.
    Github https://github.com/vadimpopa
    Sencha tips and articles : http://vadimpopa.com
    Twitter: @vadimvpopa

Thread Participants: 1

Tags for this Thread