Using a WebView with a javascript interface, my goal is to alter the inner HTML of a span based on whether certain checkboxes are selected.
Here's an excerpt from a String in strings.xml. The function onSubmit should not proceed if it fails. My issue lies with getting the innerHtml to work correctly (it always returns true).
The following code functions
<script type=\"text/javascript\" language=\"javascript\">
function pass() {
return javaInterface.checkboxPass();
}
</script>
This code consistently returns true
<script type=\"text/javascript\" language=\"javascript\">
function pass() {
var passed= javaInterface.checkboxPass();
if(passed) {
document.getElementById(\"txtInstructions\").innerHTML = \'Loading Website...\';
}
return passed;
}
</script>
Here is the specific span within the body of the document
<span id=\"txtInstructions\">%1$s</span>
What could be causing my issue?