Hi.
I hope I can explain this clearly enough. here goes...
I have an .html file that I load into a webview using httputils2. I create the file on my server with php and assign buttons to Invoice numbers which are then put into a table.
When I click a button in my webview, myFunction changes the document.title to $InvNo.
In B4A I can add a button to the panel that holds the webview and do this to get the invoice number(button) that I click in the webview.
My question is can I get the value from the button in the webview without having to use a second button on the panel to get the value?
Thanks
I hope I can explain this clearly enough. here goes...
I have an .html file that I load into a webview using httputils2. I create the file on my server with php and assign buttons to Invoice numbers which are then put into a table.
B4X:
echo "<td><button id=$InvNo onclick=myFunction($InvNo)>$InvNo</button></td>";
B4X:
<script>
function myFunction(InvNo)
{
document.title = InvNo;
}
</script>
B4X:
Sub btnWVinv_Click
WebInterface.executeJavascript(wv, "B4A.CallSub('SavePageTitle',true, document.title)")
End Sub
Thanks