Why does the first section of code work, but not the second (Code is in the page finished sub)? It works (moves down to named anchor) when I don't use a variable, it doesn't work when I use a variable.
B4X:
Sub Activity_Create(FirstTime As Boolean)
FlingableWebView1.LoadUrl("http://alumnihighschool.net/scriptures/bm/1_ne/1.html")
End Sub
Sub FlingableWebView1_PageFinished (url As String)
Dim Javascript As String
Javascript = "window.location.hash='#1: 8'"
WebViewExtras1.executeJavascript(FlingableWebView1, Javascript)
End Sub
B4X:
Sub Activity_Create(FirstTime As Boolean)
FlingableWebView1.LoadUrl("http://alumnihighschool.net/scriptures/bm/1_ne/1.html")
End Sub
Sub FlingableWebView1_PageFinished (url As String)
TagsAnchorName = "#1: 8"
Dim Javascript As String
Javascript = "window.location.hash='" & TagsAnchorName & "'"
WebViewExtras1.executeJavascript(FlingableWebView1, Javascript)
End Sub
Last edited: