PDA

View Full Version : MessageBox chain



rarerules
3 May 2007, 5:46 AM
Hello,

I am interested in having a series of MessageBox dialogs as follows:

1. When the user clicks 'OK' on the first MessageBox, the second MessageBox pops up
2. When the user clicks 'OK on the second MessageBox, the third MessageBox pops up,
etc...

This works fine, except that I want to prevent user interaction with the base page throughout this chain of events. Currently, the modal disappears after the first MessageBox hides. For example:



Ext.MessageBox.show({
title: 'Comment Box',
msg: 'Please add a comment:',
width:300,
buttons: Ext.MessageBox.OKCANCEL,
multiline: true,
animEl: 'grid',
fn: function(buttonClicked,text) {
if(buttonClicked == 'ok') {
Ext.MessageBox.confirm('Confirm', 'Are you sure?', showResult);
}
}
});


In this example, the page is greyed out until the user clicks OK on the first MessageBox, at which point the 'grey out' does not remain while the second MessageBox is on screen.

Any ideas on how to keep modal=true throughout?

Thanks!:D