1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Cascading popup list of values between two columns in tabular form

Discussion in 'Oracle Application Express (APEX)' started by vgopalan, Aug 24, 2018.

  1. vgopalan

    vgopalan Newly Initiated

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    30
    Location:
    Andhra Pradesh
    Hi All,

    Is it possible to implement cascading POPUP LOV in tabular form..?
    I browsed and tried the requirement in google to get the solution but i couldn't get the expected result which works. If any one knows how to handle the issue, could you please let me know..? I followed the below JScript and Dynamic Action even then it was not fixed.

    Code (Javascript):
    (function($){;
    /*** Cascading popup list ***/
    $.fn.htmldbCascadePopup=function(parent,tempItem,options){
     
      options=$.extend({
       loadingTxt    : "Loading ...",
       loadingCss    : {"width":"80px","float":"left"}
      },options);
     
      return this.each(function(i){
     
       var self=$(this);
       var anchor=self.next("a");
       var lParent=$(parent).eq(i);
       var lHref=anchor.attr("href").substr(11);
       var lPopupFn=new Function(lHref);
       /* Clear child when parent changes */
       lParent.change(function(){
        self.val("");
       });
     
       anchor.click(function(e){
        e.preventDefault();
     
        var lParentVal=$(lParent).val();
        if(!lParentVal){lParentVal="";};
     
        $.ajax({
         type:"POST",
         async:false,
         url:"wwv_flow.show",
         data:{
          p_flow_id:"&APP_ID.",
          p_flow_step_id:"&APP_PAGE_ID.",
          p_instance:"&APP_SESSION.",
          p_request:"APPLICATION_PROCESS=G_POPUP_PARENT_VALUE",
          p_arg_names:tempItem,
          p_arg_values:lParentVal
         },beforeSend:function(){
          self
           .hide()
           .after($("<div/>",{"html":options.loadingTxt,"css":options.loadingCss,"class":"ui-autocomplete-loading"})
            .width(self.outerWidth())
            .height(self.outerHeight())
           );
         },complete:function(){
          lPopupFn();
          self
           .show()
           .next("div.ui-autocomplete-loading")
           .remove();
         }
        });
     
       });
      });
    };
    })(apex.jQuery);
    Create dynamic Action. Select Advanced
    • Name: Set cascading Popup LOV after refresh and onload
    • Event: After Refresh
    • Selection Type: Region
    • Region: {select your report region}
    • Condition: No Condition
    • Action: Execute JavaScript code
    • Fire On Page Load: True
    • Code:
      $("[name=f04]").htmldbCascadePopup(
      "[name=f05]",
      "G_POPUP_PARENT_VALUE" /*Application Item*/
      );
    • Selection Type: None

    Thanks and Regards,
    VGopalan
     
    Last edited: Sep 14, 2018