0

Problem I am facing is that when I activate the dijit.dialog(), the web page blurs and I can not connect with the page till I close the dialog box. Is there some way that I can keep the dialog box open and still access the page. By access I mean that the web page should be able to listen to click events or things like that. If not is there some other tool that I can use?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Sam007
  • 8,397
  • 4
  • 24
  • 34

1 Answers1

0

Consider dojox/layout/FloatingPane because dijit/Dialog is quite hard-wired to be modal (via singletons):

// var FloatingPane = require("dojox/layout/FloatingPane");
var floatingPane = new FloatingPane({
    title: "FloatingPane",
    content: "Hello World!",
    resizable: false,
    dockable: false
}, "floatingPane");

floatingPane.startup();

or if you insist on dijit/Dialog you can subclass it, but expect possible weird stuff, esp. when nesting and/or combining modal/non-modal dialogs:

// var Dialog = require("dijit/Dialog");
var ModelessDialog = declare(Dialog, {
    show: function() {
        this.inherited(arguments);
        Dialog._DialogLevelManager.hide(this);                      
    }
});

See it in action at jsFiddle: http://jsfiddle.net/phusick/TgEWL/

N.B.: Do not forget to include dojox/layout/resources/FloatingPane.css and dojox/layout/resources/ResizeHandle.css stylesheets when using FloatingPane.

phusick
  • 7,342
  • 1
  • 21
  • 26
  • Thanks for the reply @phusick. I am using the floating pane but I am facing the issue of closing and opening it. I did post this question, http://stackoverflow.com/questions/12548488/unable-to-close-and-reopen-floating-panel-in-dojox but did not receive any response so thought creating Dialog and destroying it was easy so went for it but the Modal feature was a problem. Can u help me in how I can destroy the Floating pane widget and reassign new one? – Sam007 Nov 07 '12 at 18:13