How to stop execution when WebDialog is open?

I am using a WebDialog and when I use .show to display the dialog the code continues to execute.
How do I stop execute until the user exits the dialog.

I basically, need some information the user enters in the dialog to proceed.

Thanks in Advanced

You cannot stop execution when the dialog is called. Instead you can move the code that would run after the web dialog call to the Dismissed event handler of the web dialog. Refer to the Web Dialog Boxes topic in the User Guide for more information.

Web Dialog Boxes

Thanks