I don't see this script in the project you've uploaded.
Below is the complete Source :
Sub Process_Globals
Dim cUrl As String
End Sub
Sub Globals
Dim Webpage As WebView
Dim WebViewerExtra As WebViewExtras
End Sub
Sub Activity_Create(FirstTime As Boolean)
Webpage.Initialize("MyWeb")
Activity.AddView(Webpage, 0, 0, 100%x, 100%y)
WebViewerExtra.addJavascriptInterface(Webpage, "B4A")
Test
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Test
Dim myHtml As StringBuilder
Dim myHtmlString As String
myHtml.Initialize
myHtml.Append ("<html>")
myHtml.Append ("<script language='JavaScript'>")
myHtml.Append("function myfunction(){")
myHtml.Append(" B4A.CallSub('b4aGetID');")
myHtml.Append ("}</script>")
myHtml.Append("<body>")
myHtml.Append ("<p id=""demo"" onclick=""myfunction()"">Click Me To change my text color.</p>")
myHtml.Append ("</body></html>")
myHtmlString=myHtml.ToString
Webpage.LoadHtml(myHtmlString)
End Sub
Sub b4aGetID()
Msgbox("press","test")
End Sub
Sub myWeb_OverrideUrl (Url As String) As Boolean
ToastMessageShow(Url,False)
End Sub
Sub myWeb_PageFinished (Url As String)
ToastMessageShow(Url,False)
End Subhing it
It doesnt fire Test when i click the button demo, the only thing it only fire MyWeb_OverrideUrl for the first time it launch
But This is not that i want.
Tks for help...