Open modal dialog through JavaScript Oracle APEX

前端 未结 2 2008
攒了一身酷
攒了一身酷 2021-01-03 09:50

I am trying to open a modal dialog page through a JavaScript redirect URL.

My code is like this:

$(\'#Subnet tr\').each(function (i, row){
        va         


        
2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-03 10:15

    This would also be a working solution (slightly different).

    Please note the call the apex.navigation.redirect to actually OPEN the dialog page.

    function editAgenda (p_agenda_id) {
    l_url = 'f?p=#APP_ID#:72:#SESSION#::NO:RP,72:P72_AGENDA_ID:#AGENDA_ID#';
    
    l_url = l_url.replace('#APP_ID#',    $v('pFlowId'));
    l_url = l_url.replace('#SESSION#',   $v('pInstance'));
    l_url = l_url.replace('#AGENDA_ID#', p_agenda_id);
    
    // execute PL/SQL API apex_uti.prepare_url to generate a valid Session State Protection checksum
    apex.server.process(    
        'editAgendaDA',
        {x01: l_url},
        {success: function (pData) {           
                console.log(pData);
                // Call Modal Dialog Page
                apex.navigation.redirect(pData);
            },
            dataType: "text"                     
        }
      );
    

    }

    -- Process editAgendaDA (in Ajax Callback)

    declare
        l_url varchar2(2000);   
        v_result varchar2(4000);
    begin
        v_result := apex_util.prepare_url(apex_application.g_x01);
        htp.prn(v_result);
    end;
    

提交回复
热议问题