tags:

views:

453

answers:

3

can a dojo dialog bring up another dojo dialog?

A: 

Yes, a dialog can open another dialog, but then you'd have two dialogs displayed -- they aren't modal between each other.

Since this is not the behavior I desire I've worked around this by creating my own handler -- it first checks for an open dialog, and if it finds one, closes it (and places it on a stack) before opening a new dialog. When it closes one it looks at the stack and re-opens dialogs lower on the stack.

scotts
Is sample code this available somewhere? Thanx
Shailesh Kumar
+1  A: 

dojo 1.3 only supports one modal dialog at a time, so while, yes, one dialog can open another, closing the second destroys the modality of the first.

This happens because dojo.Dialog uses a single global underlay object that provides screen between the dialog and anything else on the page. You can make it work if you're wiling to create your own underlay for each dialog and manage the z-indexes yourself.

I understand this will be rectified in 1.4.

Ed
A: 

Multiple dialogs can be opened prior to Dojo 1.4, but there are problems with accessibility in that case (tabIndex is handled wrong) - so if you need your app to be accessible and support mutliple dialogs., you need to upgrade to Dojo 1.4 when it comes out.

Joscha