You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Android Question
WebViewExtras1.JavaScriptEnabled not work
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("111")
' WebView1.Initialize("")
WebViewExtras1.Initialize(WebView1)
' WebViewExtras1 now has all the methods and properties of WebView1 plus it's additonal methods and properties
' so you can use WebView1 to get/set WebView properties/methods
' or use WebViewExtras1 to get/set WebView1 properties/methods with the additional properties/method of WebViewExtras
Dim WebViewClient1 As DefaultWebViewClient
WebViewClient1.Initialize("WebViewClient1")
WebViewExtras1.JavaScriptEnabled=True
WebViewExtras1.SetWebViewClient(WebViewClient1)
WebViewExtras1.AddJavascriptInterface(WebViewClient1,"B4A")
WebViewExtras1.CanGoback()
WebViewExtras1.LoadUrl("https://192.168.0.106/MobileOffice/D2548BA4-E6FD-43A0-9423-F4AE0BC7B710/Phone/Auth/Authorize/" & pId.GetDeviceId)
End Sub
Sub WebViewGoBack_Request()
WebViewExtras1.GoBackOrForward(-1)
Log(9)
End Sub
Sub WebViewGoBack_Request() 'you need this sub in B4A so the webpage can call this sub
WebviewClient1.Back
End Sub
I provide Custom Hardware and Software Solutions to Help Automate a Business to Reduce Costs and Increase Productivity.
If any of my posts were helpful, please consider a
donation
of any amount ... or clicking on the
Solution Vote
or the
Like
button would be appreciated too.
This will narrow down if the problem is that the goBack is not being called, or if the B4A.CallSub is not working right, so then we will know were to focus our troubleshooting efforts.
So, does the Alert pop-up display when you click the hyperlink using the above modification?
I provide Custom Hardware and Software Solutions to Help Automate a Business to Reduce Costs and Increase Productivity.
If any of my posts were helpful, please consider a
donation
of any amount ... or clicking on the
Solution Vote
or the
Like
button would be appreciated too.
I provide Custom Hardware and Software Solutions to Help Automate a Business to Reduce Costs and Increase Productivity.
If any of my posts were helpful, please consider a
donation
of any amount ... or clicking on the
Solution Vote
or the
Like
button would be appreciated too.
I provide Custom Hardware and Software Solutions to Help Automate a Business to Reduce Costs and Increase Productivity.
If any of my posts were helpful, please consider a
donation
of any amount ... or clicking on the
Solution Vote
or the
Like
button would be appreciated too.
I provide Custom Hardware and Software Solutions to Help Automate a Business to Reduce Costs and Increase Productivity.
If any of my posts were helpful, please consider a
donation
of any amount ... or clicking on the
Solution Vote
or the
Like
button would be appreciated too.
I provide Custom Hardware and Software Solutions to Help Automate a Business to Reduce Costs and Increase Productivity.
If any of my posts were helpful, please consider a
donation
of any amount ... or clicking on the
Solution Vote
or the
Like
button would be appreciated too.
I provide Custom Hardware and Software Solutions to Help Automate a Business to Reduce Costs and Increase Productivity.
If any of my posts were helpful, please consider a
donation
of any amount ... or clicking on the
Solution Vote
or the
Like
button would be appreciated too.
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("111")
' WebView1.Initialize("")
WebViewExtras1.Initialize(WebView1)
' WebViewExtras1 now has all the methods and properties of WebView1 plus it's additonal methods and properties
' so you can use WebView1 to get/set WebView properties/methods
' or use WebViewExtras1 to get/set WebView1 properties/methods with the additional properties/method of WebViewExtras
Dim WebViewClient1 As DefaultWebViewClient
WebViewClient1.Initialize("WebViewClient1")
WebViewExtras1.JavaScriptEnabled=True
WebViewExtras1.SetWebViewClient(WebViewClient1)
'This row is useless
'WebViewExtras1.AddJavascriptInterface(WebViewClient1,"B4A")
Dim JavascriptInterface1 As DefaultJavascriptInterface
JavascriptInterface1.Initialize
WebViewExtras1.AddJavascriptInterface(JavascriptInterface1,"B4A")
WebViewExtras1.CanGoback()
WebViewExtras1.LoadUrl("https://192.168.0.106/MobileOffice/D2548BA4-E6FD-43A0-9423-F4AE0BC7B710/Phone/Auth/Authorize/" & pId.GetDeviceId)
End Sub
Sub WebViewGoBack_Request()
WebViewExtras1.GoBackOrForward(-1)
Log(9)
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…