View Full Version : Waiting for modal dialog to complete?

16 Apr 2007, 11:12 AM
I have a combo box that starts up a modal dialog in some cases on 'select'. I create the dialog and call dialog.show(), but I don't want the combo box to finish the select() until I get the results from the dialog box. I'm not sure how to pause, it seems like the code to dialog.show() just continues on.

16 Apr 2007, 11:52 AM
You can't really "pause" javascript. Usually this is done by calling one process that then calls a callback function when complete to do something else. You'll probably need to handle the beforeselect event and provide for a way of enforcing when the select can actually occur based on the value of whatever gets returned from the dialog.