Android Question Webbrowser getting clicked element

Addo

Well-Known Member
Licensed User
Good morning / afternoon based on where you live
I wonder if there is a way to capture the clicked elements in webbrowser?

As example i have this html element
HTML:
<p data="somevalue" >clickme</p>

Is there any way to get the data value when u ckick on click me?
 

DonManfred

Expert
Licensed User
Longtime User

Add a javascriptinterface and add javascript to raise the event when it is clicked.

I can´t help with the needed javascript as HTML and Javascript is not my strong side.


Maybe
HTML:
<p data="somevalue" onclick="theFunction()">clickme</p>
Clicking on clickme should raise the Javascript function theFunction. In this method you can use the Javascriptinterface to raise an Event in B4A.
 
Last edited:
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
technically, the answer is yes. if the webpage is yours, it's simple (as desribed by @DonManfred). if the webpage is not yours, then things range from less easy to not possible. you need to clarify fully.
 
Upvote 0
Top