V ViNaTa Member Jan 13, 2023 #1 I Want a code like [CODE lang="b4x" title="WebView" highlight="3"]Dim domain As String = "https://google.com" WebView1.LoadUrl(domain) if WebView1.Url = "https://b4x.com" then 'Do the Action End If[/CODE] Means if in google he open b4x.com then some action start I Don't know how I write it to its work pls help me
I Want a code like [CODE lang="b4x" title="WebView" highlight="3"]Dim domain As String = "https://google.com" WebView1.LoadUrl(domain) if WebView1.Url = "https://b4x.com" then 'Do the Action End If[/CODE] Means if in google he open b4x.com then some action start I Don't know how I write it to its work pls help me
JohnC Expert Licensed User Longtime User Jan 14, 2023 #2 You would have event code like this that would run when the user clicks a link that goes to b4x.com: B4X: Sub Webview1_OverrideUrl (URL As String) As Boolean If URL.ToUpperCase = "HTTPS://B4X.COM" Then 'do action End If Return False 'flag so that webview1 will still display the webpage End Sub Upvote 0
You would have event code like this that would run when the user clicks a link that goes to b4x.com: B4X: Sub Webview1_OverrideUrl (URL As String) As Boolean If URL.ToUpperCase = "HTTPS://B4X.COM" Then 'do action End If Return False 'flag so that webview1 will still display the webpage End Sub
V ViNaTa Member Jan 14, 2023 #3 It's work but B4X: If URL.ToUpperCase = "HTTPS://B4X.COM" Then Not Work I use B4X: If URL = "HTTPS://B4X.COM" Then And it's work thanks) Upvote 0
It's work but B4X: If URL.ToUpperCase = "HTTPS://B4X.COM" Then Not Work I use B4X: If URL = "HTTPS://B4X.COM" Then And it's work thanks)