B4J Code Snippet WebApp - Get the value of the checkbox

Good morning everyone,

I was trying to get the value of a checkbox in a WebApp and I was not able with the methods described in some threads. This is because no matter if I was checking it there was no attribute checked in the tag of the checkbox. Googling it I found that the correct method in JQuery is the following:

B4X:
    Dim feat As Future = chkokupdated.RunMethodWithResult("is", Array(":checked"))
    If feat.Value.As(String) = "true" Then

    End if
 

jkhazraji

Active Member
Licensed User
Longtime User
B4X:
log(ws.Eval("document.querySelector('#mychkbox').checked)",Null))
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…