B Baris Karadeniz Active Member Licensed User May 5, 2016 #1 I use Page1 for webview in my project. There are some pdf files at the web site. They are opened on Page1 too. I want that pdf files are opened at Page2. How can I provide pdf files open at Page2?
I use Page1 for webview in my project. There are some pdf files at the web site. They are opened on Page1 too. I want that pdf files are opened at Page2. How can I provide pdf files open at Page2?
B Baris Karadeniz Active Member Licensed User May 5, 2016 #2 Here are the codes. What should I write at the dotted line? Or some other ways? Sub WebView1_OverrideUrl (Url As String) As Boolean If Url.EndsWith(".pdf") Then NavControl.ShowPage(Page2) ....................................................... Return True Else Return False End If End Sub Upvote 0
Here are the codes. What should I write at the dotted line? Or some other ways? Sub WebView1_OverrideUrl (Url As String) As Boolean If Url.EndsWith(".pdf") Then NavControl.ShowPage(Page2) ....................................................... Return True Else Return False End If End Sub
Erel B4X founder Staff member Licensed User Longtime User May 5, 2016 #3 1. Please use [code]code here...[/code] tags when posting code. 2. It is difficult to help if you make duplicate posts. A simple way to show the pdf on the second page is to add a WebView to the second page and load the pdf url to that WebView: Code: Copy Sub WebView1_OverrideUrl (Url As String) As Boolean If Url.EndsWith(".pdf") Then NavControl.ShowPage(Page2) WebViewThatBelongsToPage2.LoadUrl(Url) Return True Else Return False End If End Sub Upvote 0
1. Please use [code]code here...[/code] tags when posting code. 2. It is difficult to help if you make duplicate posts. A simple way to show the pdf on the second page is to add a WebView to the second page and load the pdf url to that WebView: Code: Copy Sub WebView1_OverrideUrl (Url As String) As Boolean If Url.EndsWith(".pdf") Then NavControl.ShowPage(Page2) WebViewThatBelongsToPage2.LoadUrl(Url) Return True Else Return False End If End Sub