PDA

View Full Version : MessageBox



comm
4 Oct 2007, 10:28 PM
I use classic window.confirm() and window.alert() often. This window can block any next execution code, validation purpose for instance.

How can I do this with Ext.MessageBox?

Thx.

brian.moeskau
4 Oct 2007, 10:47 PM
There is no way to do it. If the goal is really to stop browser execution, stick with alert. If the goal is to act conditionally based on the result of the MessageBox, you'll have to use a callback function tied to the user action (look at the fn config supported by MessageBox.show: http://extjs.com/deploy/ext/docs/output/Ext.MessageBox.html#show).

bhomass
25 Oct 2007, 10:38 AM
I know how to use MessageBox.show and specify the callback. However, it seems from the doc that the arg to the callback is limited to the button and textbox value. I actually need to pass an action.result.xxx to the callback. How can I accomplish that?