Sub Class_Globals
Private ws As WebSocket
Private Dialog As JQueryElement
[....]
End Sub
Private Sub WebSocket_Connected (WebSocket1 As WebSocket)
ws = WebSocket1
Dialog.RunMethod("dialog", Array As Object(CreateMap("autoOpen": False, "modal": True)))
End Sub
Sub ShowDialog(Message As String, Title As String)
Dialog.SetHtml(Message)
Dialog.RunMethod("dialog", Array As Object("option", "title", Title))
Dialog.RunMethod("dialog", Array As Object("open"))
End Sub
Sub btnmail_Click (Params As Map)
Log("Bravo!")
ShowDialog("Hai premuto un bottone!","B4J Dialog")
End Sub