Monday, 4 December 2023

Oracle APEX Classic report Card template - card link

 

Oracle APEX Classic report Card template - card link

Making your card be a link?

 
This one is more for my reference as it comes handy on many occasions.
 
You made a classic report with a card template based on a query and you want your card title link to be applied on card level?
Quick cookbook:
  1. create region based on a query
  2. pick one column and make it a link using column settings for example card_title
  3. Create After Refresh region Dynamic action and this JS to it
$('.t-Card-title a').each(function(index) {
   lnk = $(this).attr('href');
   
   $(this).closest('.t-Card-wrap')          
          .attr('data-href', lnk)
          .click(function(){
            window.location=$(this).attr('data-href');
          })
          .mouseover(function(){
            $(this).css('cursor', 'pointer');
          })
          .mouseleave(function(){
            $(this).css('cursor', 'default');
          })
});
Similar technique can be applied to IR report with different selectors. 
 
Happy APEXing,
Lino
 
 


1 comment:

  1. Great use of the Oracle APEX Classic report Card template! For smooth hosting, TSO Host is a fantastic choice.

    ReplyDelete