Hi.
This is a simple task with
JSInterface.
First thing is to add the B4A javascript interface to the WebView that's displaying the form (let's assume it's named WebView1):
Sub Globals
Dim myInterface As JSInterface
Dim WebView1 As WebView
End Sub
Sub Activity_Create(FirstTime As Boolean)
myInterface.addJSInterface(WebView1, "B4A")
End Sub
Now you need a B4A Sub that your web page can call to pass the data to:
Sub processFormData(data As String)
Log("data is '"&data&"'"
End Sub
Now update your javascript function to call the B4A Sub processFormData, passing your
c_value String:
function get_check_value() {
var c_value = "";
for (var i = 0; i < document.orderform.music.length; i++) {
if (document.orderform.music[i].checked) {
c_value = c_value + document.orderform.music[i].value + "\n";
}
}
B4A.CallSub("processFormData", c_value);
}
If you need to cause get_check_value() to be executed from B4A then you can do this in B4A:
WebView1.execJS("get_check_value()")
As long as get_check_value() is within global scope of the page then it will now be executed.
Martin.