1 Reply Latest reply: Sep 12, 2013 4:44 PM by John K.-Oracle RSS

    Format right to left in tabular form

    John K.-Oracle

      Hi All,

      I have a tabular form that displays about 15 rows per page and the total number of rows at any given time can be in the hundreds, so I have pagination set like 1-15, 16-30 etc etc. The form itself contains text that has been - or needs to be - translated to any one of a handful of languages.


      There is a drop down list for selecting Language. If the language is Hebrew or Arabic I have a javascript function for displaying the text in the applicable tab form column right to left:


      function displayResultRTL()
          var lang = document.getElementById("P15_LANGUAGE"); //Language LOV DOM element
          if (lang.value === 'IW' || lang.value === 'AR') //if Arabic or Hebrew
              for (var i = 0; i < document.wwv_flow.f02.length; i++) //loop through all rows of tab form
                  var curr_id = document.wwv_flow.f02[i].id;
                  $x(curr_id).style.direction = "rtl";


      I have a dynamic action setup to call this function on page load. So far so good. The problem is that if a user does anything that doesn't reload the page, then the function doesn't get called and the text reverts to left-to-right. For example, if they select a pagination range like '16-30', the new rows are displayed without calling the function. Similarly if they search something on the page that also does not reload the page so all the text reverts to left-to-right.


      Sorry if this is an obvious answer but do I need anticipate every action the user will take and then create a dynamic action to call my function based on every DOM element click? Surely there must be an easier way but I'm just not sure what it is.


      Any advice or guidance is much appreciated.