PDA

View Full Version : alert not waiting



Limey
17 Sep 2009, 10:51 AM
hello all,

I'm trying to pop the user a message and then redirect them to a different page:



Ext.Msg.alert('Status', 'Change successfully commited!',location.replace('Main.cfm'));


however, it does not wait for the user to click OK, it just shows the message and then moves on.

Any ideas?

Thanks

Animal
17 Sep 2009, 11:18 AM
Read the docs more carefully

evant
17 Sep 2009, 4:29 PM
Specifically:



Utility class for generating different styles of message boxes. The alias Ext.Msg can also be used.

Note that the MessageBox is asynchronous. Unlike a regular JavaScript alert (which will halt browser execution), showing a MessageBox will not cause the code to stop. For this reason, if you have code that should only run after some user feedback from the MessageBox, you must use a callback function (see the function parameter for show for more details).