Sep 22, 2018 B4i does not yet have a library to add a JavaScript Interface like WebviewExtras in B4A that uses addJavascriptInterface. Based in this thread https://www.b4x.com/android/forum/threads/b4i-addjavascriptinterface.72837/#post-462960 I used this method that way and put this in the html file Code: Copy <script> ... location.href = "#Page_Loaded"; ... </ script> B4i to watch what is happening in the script html: Code: Copy Sub Webview1_OverrideUrl (Url As String) If Url.Contains ("#Page_Loaded") Then 'Do something Else if Url.Contains ("#showall") Then 'Do something End If End Sub You can use anything with '#' #eat_apple #do_anything #showall the hash tag # does not redirect the browser to any location, remaining in the same state and at the same time, allowing a string parameter to be passed to the OverrideUrl event I hope it's useful. Like this to let me know that this worked for you too. Last edited: Sep 22, 2018 Click to expand...
B4i does not yet have a library to add a JavaScript Interface like WebviewExtras in B4A that uses addJavascriptInterface. Based in this thread https://www.b4x.com/android/forum/threads/b4i-addjavascriptinterface.72837/#post-462960 I used this method that way and put this in the html file Code: Copy <script> ... location.href = "#Page_Loaded"; ... </ script> B4i to watch what is happening in the script html: Code: Copy Sub Webview1_OverrideUrl (Url As String) If Url.Contains ("#Page_Loaded") Then 'Do something Else if Url.Contains ("#showall") Then 'Do something End If End Sub You can use anything with '#' #eat_apple #do_anything #showall the hash tag # does not redirect the browser to any location, remaining in the same state and at the same time, allowing a string parameter to be passed to the OverrideUrl event I hope it's useful. Like this to let me know that this worked for you too.