B4J Question How to add an item to an html Combo/Listbox

B4JExplorer

Active Member
Licensed User
Longtime User

B4JExplorer

Active Member
Licensed User
Longtime User
Ah, I see, said the blind man.

For anyone who's paying attention, and wants to avoid searching down the code -


The crucial code for appending to a listbox is in the FillSelectBox() sub, in WSDBUtilsExample.bas,


sb.Append("<option value='").Append(val).Append("'>").Append(val).Append("</option>")

(sb is a StringBuilder instance)

, which is then converted to html with

jq.SetHtml(sb.ToString)


, and the change event for selecting another item in a listbox, is simply _Change:

Sub lstStudentsId_Change (Params As Map)
 
Upvote 0
Top