After popupURL, must close the window, submit the value and redirect the other window

Hello

I use 4 APEX for development.

Use the following URL target in my main page

JavaScript:popupURL('f?p=&APP_ID.:99:&APP_SESSION.::&Debug.::P99_PORT_ACC_HEAD_TAX_ID:&P20_PORT_ACC_HEAD_TAX_ID.',300,300);

This opens the page 99. On page 99, I need to collect some required information. Once a user clicks on the button "send" in the pop-up window, the following actions are needed:

1. an update of the database in the new value column... create a process, but it does not work because the page closes do not submit.
2. close the pop-up window, which I use javascript:window.close();
3 redirect the original page 20 to page 15

Can someone please give that some advice?

Thank you
Ling

If you are on apex 4, achieve dynamic Action that runs on the key

  • With the first real action runs the PLSQL code required (make sure that you add the elements of the page has changed to "Page elements to send field")
  • The second real action can be of the Js code and put it in your code.

    -----------------------
    Another way a bit more complicated (but works with all versions of the apex) is generating the JS code in PLSQL

    If your button (in the popup page) submits the page
    You will have a PLSQL process that performs the necessary treatment on the sidelines.
    After the treatment, you add the somee code that generates the code JS

    It would be like

    BEGIN
     /* Do your PLSQL Processing here */
    
     /*Js Code to close page etc
      Note that this code will be run only after the PLSQL and on the next page load, don't try to mix up JS and PLSQL expecting a JS code(between two PLSQL blocks) to run between the PLSQL blocks. Remember JS runs in browser and PLSQL in server, so all JS code waits till page is reloded
     */
     htp.p('');
    END;
    

    ---------------------------------------------------

    Another method is to add the JS code to an onload function performed only under certain conditions, he said when a page element is defined with a specific value. You set this element of the page with this is completed only once the PLSQL block value, where the JS code executes only after treatment and not on each load of laundry.

    Use one of these methods depending on what feels easy/comfortable for you.

  • Tags: Database

    Similar Questions

    Maybe you are looking for