Jim2025
Member
inside class:
why clicked sub not work?
how can i solve this problem? i just want to call clicked sub on click generated html dynamically.
codes:
' inside another sub for initilize
wve.Initialize(webv)
Dim WebChromeClient1 As DefaultWebChromeClient
WebChromeClient1.Initialize("WebChromeClient1")
wve.SetWebChromeClient(WebChromeClient1)
private Sub webv_PageFinished (Url As String)
' wve is same webviewextras
'This alert code work good :
'wve.ExecuteJavascript("document.querySelector('.nav-bar').innerHTML='<nav class=""navbar-widgets-right navbar-widgets-section"" onclick=""alert(\'test\');"">-</nav>';")
'but B4A.CallSub not work !!!
wve.ExecuteJavascript("document.querySelector('.nav-bar').innerHTML='<nav class=""navbar-widgets-right navbar-widgets-section"" onclick=""B4A.CallSub(\'clicked\',false);"">-</nav>';")
webv.Visible=True
wve.ClearCache(True)
End Sub
Sub clicked()
ToastMessageShow("body clicked.",False)
End Sub
why clicked sub not work?
how can i solve this problem? i just want to call clicked sub on click generated html dynamically.