admin管理员组文章数量:1426839
I set data-id in ID column html expression, like: data-id=&ID. - and it works. But, how I can set data-id=&LAST_NAME. in same report and use that data-id in JavaScript?
I set data-id in ID column html expression, like: data-id=&ID. - and it works. But, how I can set data-id=&LAST_NAME. in same report and use that data-id in JavaScript?
Share Improve this question asked Sep 27, 2021 at 7:30 GokuGoku 4411 gold badge8 silver badges23 bronze badges2 Answers
Reset to default 4Typically you add a class to the same html tag as the data attribute, for example class="myclass"
. Then add a dynamic action on click of jquery selector .myclass
. In javascript then reference the value of the data-id
with the expression this.triggeringElement.dataset['id']
- this could be used in an action of type "Set Value" to set a page item value to the data-id
attribute of a clicked row.
Note that it doesn't have to be "data-id". It's possible to use "data-whateveryouwant". So you would have a "data-empno", a "data-ename" and a "data-deptno", all in the same html tag. Also explained here
When you use: example
01. use the class="myClassName"
02. add dynamic action on click of jquery selector .myClassName
03. set the page item value of multiple data attribute with js expression
$(this.triggeringElement).data('id');
$(this.triggeringElement).data('last_name');
本文标签: javascriptHow to use multiple dataid in Oracle APEXStack Overflow
版权声明:本文标题:javascript - How to use multiple data-id in Oracle APEX? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745411770a2657502.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论