javascript - How to use multiple data-id in Oracle APEX? - Stack Overflow

I set data-id in ID column html expression, like:data-id=&ID. - and it works.But, how I can set d

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 badges
Add a ment  | 

2 Answers 2

Reset to default 4

Typically 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');

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745411770a4626566.html

相关推荐

  • javascript - How to use multiple data-id in Oracle APEX? - Stack Overflow

    I set data-id in ID column html expression, like:data-id=&ID. - and it works.But, how I can set d

    4小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信