Blueforcer Well-Known Member Licensed User Longtime User Jul 19, 2018 #1 Hello, Im really new in Webapp development. For my current Project i need to get all IDs from the current document. this is the working javascript function: Code: document.querySelectorAll('*[id]') But how i have to do it in B4J? This one dont work. Code: Dim F As Future = ws.RunFunctionWithResult("document.querySelectorAll",Array As Object("*[id]")) thank you in advance
Hello, Im really new in Webapp development. For my current Project i need to get all IDs from the current document. this is the working javascript function: Code: document.querySelectorAll('*[id]') But how i have to do it in B4J? This one dont work. Code: Dim F As Future = ws.RunFunctionWithResult("document.querySelectorAll",Array As Object("*[id]")) thank you in advance
Erel B4X founder Staff member Licensed User Longtime User Jul 20, 2018 #2 RunFunction runs a JavaScript function. You need to use EvalWithResult. Upvote 0
Blueforcer Well-Known Member Licensed User Longtime User Jul 20, 2018 #3 that doesn't work either. Value is still Null But before we look for the mistake: is it even possible to access these elements at the end without having declared them explicitly beforehand? Because I have several HTML pages that are dynamically generated by another program. Each element has a unique ID. But I just want to read/describe the elements that are currently present on the called page. So I would also need a way to react to all events of the "unknown" IDs. Last edited: Jul 20, 2018 Upvote 0
that doesn't work either. Value is still Null But before we look for the mistake: is it even possible to access these elements at the end without having declared them explicitly beforehand? Because I have several HTML pages that are dynamically generated by another program. Each element has a unique ID. But I just want to read/describe the elements that are currently present on the called page. So I would also need a way to react to all events of the "unknown" IDs.
Erel B4X founder Staff member Licensed User Longtime User Jul 22, 2018 #4 You can run any JavaScript code you like. Check the dynamic controls example: https://b4x.com:51041/dynamic/index.html Upvote 0
You can run any JavaScript code you like. Check the dynamic controls example: https://b4x.com:51041/dynamic/index.html