JavaScript Action cannot access to this .

1
Hi ,  I'm triyng to access to the element that trigger the function call , and I don't find any way to do it .  The context is , on my page I have a list view , On one item of the list I  click on a button and It's call a nanoflow to have a javascript action . I just have access to my MxObject , but it's doesn't help me because I want to manipulate the DOM , so I need an HTML Element .  If you have any idea that can help me to solve this It's would be great , Thank you , Myriam.
asked
2 answers
0

I think any solution to this is going to be hacky. I would personally add a unique attribute (id) to the Mendix entity, add it as a hidden field in the listview and use a document.evaluate with an xpath to find the element containing the id and select its (grand)parent.

answered
0

Perhaps you can use the Javascript button widget? I can't seem to find it in the marketplace so here is a direct link

GitHub - tieniber/JavascriptButton: A mendix button widget that can fire off JavaScript before executing a microflow

answered