mc73 Well-Known Member Licensed User Longtime User Mar 23, 2015 #1 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: Copy 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?
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: Copy 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?
Erel B4X founder Staff member Licensed User Longtime User Mar 23, 2015 #2 See the dynamic controls example: http://b4x.com:51042/dynamic/index.html The source code is available here: https://www.b4x.com/android/forum/threads/webapp-web-apps-overview.39811/ Upvote 0
See the dynamic controls example: http://b4x.com:51042/dynamic/index.html The source code is available here: https://www.b4x.com/android/forum/threads/webapp-web-apps-overview.39811/
rwblinn Well-Known Member Licensed User Longtime User Mar 24, 2015 #3 Hi, another example for adding a button dynamically can be found here. Upvote 0