4 Replies Latest reply: Dec 27, 2012 3:16 PM by evrm RSS

    Hide/Show Two Select List according to Radio Button

    Vedant
      Dear Friends,

      I am using Apex 3.2ver.

      i want to display two select lidt item conditionaly without refresh according to radio button values.

      i have one radio button iTEM P5_SELECT with three option

      1 None ------ N
      2 Template ------ T
      3 Copy Template --------I


      i have two select list

      1. P5_Template
      2. P5_Copy Template

      when i select Template option in radio button then select list item P5_Template is display.
      when i select Copy Template option in radio button then select list item P5_Copy Template is display.
      But here problem is defaut radio button value is None so both select list item are display when option is None.
      i want tohide both select list when radio button option is None.


      when i select None value from radio button then both select list item should not be display.

      so i have used
      <script>
      function Show_On_Radio_Value_2(pThis, pThat, pValue, pLabel){
         var rv = html_RadioValue(pThis);
         var elm = document.getElementById(pThat);
         var lbl = document.getElementById(pLabel);
         if (rv == pValue) {
           html_ShowElement(pThat);
           html_ShowElement(pLabel);
             } else {
           html_HideElement(pThat);
           html_HideElement(pLabel); }
        }
      
      onchange="Show_On_Radio_Value_2('P5_SELECT','P5_TEMPLATE','T','L_P5_TEMPLATE');Show_On_Radio_Value_2('P5_SELECT','P5_SOURCE_INVOICE_NO','I','L_P5_SOURCE_INVOICE_NO');"
      
      <label for="#CURRENT_ITEM_NAME#" id="L_#CURRENT_ITEM_NAME#" ><span class="t130OptionalLabel">
      </script>
      How can i hide when option is None in radio button.


      Thanks

      Edited by: Vedant on Dec 25, 2012 9:46 PM