I have a WebDialog open that contains a popup. One of the options in the popup is “Other…”. If the user selects “Other…”, I need to ask them what they want and add it to the popup selected.
So i am opening another WebDialog (sheet) to ask for the desired entry. How do I get the response.
First thing I did was create a WebDialog called Request and put the following in the popup SelectionChanged event…
[code] If pu_title.Text=“Other…” Then
Dim req As New mw_Request
req.lbl_Request.text = “What is your title”
req.txtFld_Response.text = “”
req.Show
End If[/code]
I then created a method RequestDialogDismissed(d As WebDialog) to handle the response…
pu_title.InsertRow(0,d.txtFld_Response.text)
pu_title.ListIndex = 0
To call the handler I added a handler…
If pu_title.Text="Other..." Then
Dim req As New mw_Request
req.Title = "Title"
req.lbl_Request.text = "What is your title"
req.txtFld_Response.text = ""
AddHandler req.Close RequestDialogDismissed(req)
req.Show
End If
That does not work as I get an error saying “This method doesn’t return a value” with “AddHandler req.Close” highlighted.
The Docs say that if the event returns a parameter then the handler method must return a parameter of the same type. I don’t see where the Close event returns a parameter. If so what is it?
Is there a better way to get this done?
Thanks,
John