Hi everyone: After several test, now I can use the jSignature javascript plugin I was using in my web, in my B4A app, in order to update my database from b4a the same way I'm doing in my web. I know there are some solutions to do this in B4A, but I need to do it this way because I was using it...
www.b4x.com
B4X:
Sub Button1_Click
Dim Javascript As String
Javascript="B4A.CallSub('GetBase30', true, SendBase30())"
WebViewExtras1.ExecuteJavascript(Javascript)
End Sub
Sub GetBase30(data As String)
Label1.Text = data
End Sub
Hi everyone: After several test, now I can use the jSignature javascript plugin I was using in my web, in my B4A app, in order to update my database from b4a the same way I'm doing in my web. I know there are some solutions to do this in B4A, but I need to do it this way because I was using it...
www.b4x.com
B4X:
Sub Button1_Click
Dim Javascript As String
Javascript="B4A.CallSub('GetBase30', true, SendBase30())"
WebViewExtras1.ExecuteJavascript(Javascript)
End Sub
Sub GetBase30(data As String)
Label1.Text = data
End Sub
You should have a javascript function in your webpage code, something like:
B4X:
function GetEditText() {
return document.getElementById('YourEditTextIDHere').value;
}
And in your app something like:
B4X:
Sub Button1_Click
Dim Javascript As String
Javascript="B4A.CallSub('SetTextLabel', true, GetEditText())" 'First parameter, a sub in your app, third parameter, sub you want to call in your php (or whaterver) script
WebViewExtras1.ExecuteJavascript(Javascript)
End Sub
Sub SetTextLabel(data As String)
Label1.Text = data
End Sub
Post the errors you get or export your project as zip and upload to the forum
if all you want is a webpage as is, you don't need a webview. just download the page and assign the downloaded text to your edittext:
B4X:
Dim wjob As HttpJob
wjob.Initialize("",Me)
wjob.Download("https://www.google.com")
Wait For (wjob) JobDone(wjob As HttpJob)
If wjob.Success Then
edittext1.text = wjob.GetString
wjob.Release
else
log("download failed: " & wjob.ErrorMessage)
end if
otherwise, you will need to get the javascript stuff mentioned above working
What I do exactly
Articles from sqlite database is displayed
Html encoding ready
It is displayed on WebView1
Because of the flexibility to specify text and text and paste for any part of the text in this tool
It has better display features than edittext1
Thank you, I will try to do it