B4J Question Handling added elements in websocket

Discussion in 'B4J Questions' started by mc73, Mar 23, 2015.

  1. mc73

    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:

    Code:
    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?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. rwblinn

    rwblinn Well-Known Member Licensed User

    Hi,

    another example for adding a button dynamically can be found here.
     
    Erel likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice