i try to program an easy dialog with “yes” or “no” button.
I tried to create a modal dialog with two buttons “yes” and “no”. But the program does not wait to the answeres.
Is there any easy possibility (e.g. standard functionality) to implement a yes no dialog or can anybody give tipps how to get a solution?
Thanks in advance.
How are you showing the dialog? What do you mean that it doesn’t wait for the answers?
Dialogs in web apps do not pause code like you can do in desktop apps.
Move any code that you have after the Show command for the dialog to the Dismissed event handler for the dialog, which is what is called after the dialog is closed.
I hope this helps to explain:
dim dlgQuestion as new dialogQuestionYesNo
'dlgQuestion contains the two buttons “yes” and “no”
'if the user presses “yes” the property gbAnswer gets the value “True” and the diailog is closing
dlgQuestion.txtQuestion.Text = “Do you want copy this action?”
dlgQuestion.Title = “Copy Action”
if dlgQuestion.gbAnswer = false then
msgbox "Answer: " + str(dlgQuestion.gbAnswer)
'the msgbox "Answer … " is prompting without waiting on the pressing “yes” or “no” button.
Now I read the answer of Paul.
Thank you both. I know now how to to do. I wanted to get a parametrized functionality.