appie21 Active Member Licensed User Longtime User Jul 31, 2018 #1 Hello I have 2 webviews In one of the webviews there is loading a page with a hyperlink Code: Copy <marquee behavior="scroll" direction="left"> <a href="https://www.b4x.com/android/forum/" target="_blank" style="color: yellow">Open site</a> </a> If I click the link the page will open in the same webview as where the hyperlink is. What i want is that when i click the hyperlink it open the link in the second webview
Hello I have 2 webviews In one of the webviews there is loading a page with a hyperlink Code: Copy <marquee behavior="scroll" direction="left"> <a href="https://www.b4x.com/android/forum/" target="_blank" style="color: yellow">Open site</a> </a> If I click the link the page will open in the same webview as where the hyperlink is. What i want is that when i click the hyperlink it open the link in the second webview
MarkusR Well-Known Member Licensed User Longtime User Jul 31, 2018 #2 i don't know if your wish is possible but if you can use frames u can use one webview. you can set the target to the frame name. https://wiki.selfhtml.org/wiki/HTML/Frames maybe a solution via java script https://www.b4x.com/android/forum/threads/webviewextras.12453/#content Last edited: Jul 31, 2018 Upvote 0
i don't know if your wish is possible but if you can use frames u can use one webview. you can set the target to the frame name. https://wiki.selfhtml.org/wiki/HTML/Frames maybe a solution via java script https://www.b4x.com/android/forum/threads/webviewextras.12453/#content
stevel05 Expert Licensed User Longtime User Jul 31, 2018 #3 Use the OverrideURL callback of webview and load the url into the second webview: Code: Copy Sub WebView1_OverrideUrl(Url As String) As Boolean WebView2.LoadUrl(Url) Return True 'Return True to make webview1 ignore the link End Sub Upvote 0
Use the OverrideURL callback of webview and load the url into the second webview: Code: Copy Sub WebView1_OverrideUrl(Url As String) As Boolean WebView2.LoadUrl(Url) Return True 'Return True to make webview1 ignore the link End Sub
MarkusR Well-Known Member Licensed User Longtime User Jul 31, 2018 #4 thats easy i saw this event even but the description for it is a little bit hidden in the webview description itself. GotoUrl or GotoUrlValidate would be more intuitive https://www.b4x.com/android/help/views.html#webview Upvote 0
thats easy i saw this event even but the description for it is a little bit hidden in the webview description itself. GotoUrl or GotoUrlValidate would be more intuitive https://www.b4x.com/android/help/views.html#webview