Search code examples
javascriptoraclereportoracle-apexapex

how to change background color of row based on page item value in interactive report


this is my report screen

hello guys, i have a question, in my program, there is a hidden page item, when i click any row of the order report, hidden page item takes the order id, than i change the order details table with the page item value.

everything is okay for now, i have order id on page item, with this value i want to change the background color of the that row

i mean for example page item hold 2 and if it holds 2, i want to change the background color of the row on the order table where order id is 2.

i hope, I hope I explained to you correctly


Solution

  • Start with a CSS rule:

    tr.highlighted {
      background: orange;
    }
    

    Then you just need to select your hidden page item

    document.querySelector("table tr:nth-of-type([item#])").addClass("highlighted");