B4J Question Handling added elements in websocket

mc73

Well-Known Member
Licensed User
Hello,

Suppose we have a button clicked and then we want to add a new button to our page. While adding works, I can't seem to find how to handle its click event from inside the ws module. Is there a special way of doing it, or I have to handle it "internally" using js?

Example:

B4X:
private mybutton as jQueryElement
private adiv as jQueryElement
sub myFirstButton_click(params as map)
adiv.setHtml("<button id='anewbutton'>click this one</button>")
end sub
How do I catch the click event of this new button?
 
Top