Pause a Web app - wait for response from WebDialog

From the similar threads I have found there just may not be a way to do this. But in any case, I have a web form where the user enters some data and clicks a ‘Save Profile’ button. A method edits all the data and just before finishing, I want to display a dialog that will ensure that it is a human by answering a simple math question, and then test that result before saving the profile.

As expected, the code shown below just keeps running. So as a more general question, how do you handle a dialog when the calling object needs the result before continuing. If you can’t make it wait, what’s a dialog window for any way?

thanks guys…

.
.
.
dim d As new wdVerify
d.Show
if bVerified = False then bError = True

if not bError then
  mClasses.clsStudent.InsertStudentProfile(oStudent)
  self.Close
else
  MsgBox("Correct fields in Red and retry")
  lblErrors.Visible = True
  taErrors.Visible  = True
.
.
.

Code does not run one line at a time waiting for a response. Dialogs Fire a Dismissed event when they close, so you’ll have to do your insert or msgbox from there.