Hi there!
Following the Date Picker example I'm trying to have a simple dialog pop-up as I press a button.
The button btnmail is properly working.
I mean, at least I'm sure it's connected because the log message is shown everytime I click it.
I don't know what is wrong with the dialog...can someone help and explain me? ?
Following the Date Picker example I'm trying to have a simple dialog pop-up as I press a button.
B4X:
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
The button btnmail is properly working.
I mean, at least I'm sure it's connected because the log message is shown everytime I click it.
I don't know what is wrong with the dialog...can someone help and explain me? ?