Android Question How to getcurrentselection

Makumbi

Well-Known Member
Licensed User
Please help how can i modify this code to get current selection from webview
B4X:
Sub UpdateSelectedItem
Private Query As String
Private Curs As Cursor
    
Query = "SELECT DISTINCT Account,Names, Class,Stream,Amount FROM Balances WHERE ID = " & Starter.IDList.Get(Starter.CurrentIndex)
    Curs = Starter.SQL1.ExecQuery(Query)
    For i = 0 To Curs.RowCount - 1
    Curs.Position = i

If Curs.RowCount > 0 Then
            'lblSelectedItem.Text = Curs.GetString("Names") & " " & Curs.GetString("Class")& " " & Curs.GetString("Amount")
            
            'Dim SQLQry As String = "DELETE FROM Terms"
            'Starter.SQL1.ExecNonQuery(SQLQry)
Account.Text = Curs.GetString("Account")
Classr.Text= Curs.GetString("Class")
            kname=Curs.GetString("Names")
            
        
    End If
    
Next
        
    
End Sub
 

nobbi59

Active Member
Licensed User
Longtime User
This Code has no relation to a WebView. Can you please specify your Question and what you do in the WebView.

For connecting Javascript (WebView) to your B4A Code you can use WebViewExtras Library.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…