2 Replies Latest reply: Feb 20, 2013 2:26 AM by Gus C RSS

    Onchange Highlight Cell

    Gus C
      Apex 3.2

      I have an updateable report.
      This is the source for one of my columns
      APEX_ITEM.TEXT(2,eoline.orderqty,5,10,'style="text-align:right;" onchange="show();"')
      At the moment when I change the value in this column and tab away, then it fires some javascript, which displays a region.
      <script>
      function show() {
      $x_Show('P8_R_REASON');
      $s('P8_FLAG','1');
      }
      </script>
      In my hidden region footer I have
      <script>
        if($v('P8_FLAG')=="1") {
          $x_Show('P8_R_REASON');
        } else {
          $x_Hide('P8_R_REASON');
        }
      </script>
      What I would like to do is to also highlight the cell that has been changed in yellow

      Cheers

      Gus

      Edited by: Gus C on Feb 19, 2013 11:33 PM
        • 1. Re: Onchange Highlight Cell
          fac586
          Gus C wrote:
          Apex 3.2

          I have an updateable report.
          This is the source for one of my columns
          APEX_ITEM.TEXT(2,eoline.orderqty,5,10,'style="text-align:right;" onchange="show();"')
          At the moment when I change the value in this column and tab away, then it fires some javascript, which displays a region.
          <script>
          function show() {
          $x_Show('P8_R_REASON');
          $s('P8_FLAG','1');
          }
          </script>
          In my hidden region footer I have
          <script>
          if($v('P8_FLAG')=="1") {
          $x_Show('P8_R_REASON');
          } else {
          $x_Hide('P8_R_REASON');
          }
          </script>
          What I would like to do is to also highlight the cell that has been changed in yellow
          Modify as follows:
          APEX_ITEM.TEXT(2,eoline.orderqty,5,10,'style="text-align:right;" onchange="show(this);"')
          <script>
          function show(changedItem) {
            $x_Show('P8_R_REASON');
            $s('P8_FLAG','1');
            changedItem.style.color = "#ff6";
          }
          </script>
          • 2. Re: Onchange Highlight Cell
            Gus C
            Works a treat

            Thanks

            Gus