This discussion is archived
5 Replies Latest reply: Oct 5, 2012 4:13 AM by 782187 RSS

how to submit page on load

JohnMackanzi Newbie
Currently Being Moderated
Greetings !

i m using apex 4.1, and want to submit page when page load. i tried dynamic action but it continously refreshing page. is there any other javascript or anything else from which i submit page on load

dynamic action used, event on load and action submit page but it continously submiting page.

Edited by: Omzz on Oct 4, 2012 6:15 AM
  • 1. Re: how to submit page on load
    Joni Vandenberghe Pro
    Currently Being Moderated
    What you need to do is in your dynamic action create a execute PL/SQL block action that sets the value of an item to 1 for example, and then set a condition on your dynamic action if :P1_ITEM !='1' THEN RETURN TRUE....

    Edited by: Joni Vandenberghe on 4-okt-2012 6:28
  • 2. Re: how to submit page on load
    Kleber M Journeyer
    Currently Being Moderated
    Another option is to create a branch to another page when processing is finished (to a splash page that shows it was done successfully or to return to the calling page) - otherwise default workflow is reloading the same page (and it will be done forever, as you see).
  • 3. Re: how to submit page on load
    782187 Newbie
    Currently Being Moderated
    Try this on your page:
    <script type="text/javascript">
    $(document).ready(function() {
        // renaming page items to name which you need on called page, values of page items you can set in process Before Header
        $x('P2_SML').name = 'docid';
        $x('P2_PAGE').name = 'page';
        $x('P2_AREA').name = 'area';
        $x('P2_USERNAME').name = 'username';
        $x('P2_PASSWORD').name = 'password';
        $x('wwvFlowForm').action="http://somewhere/something?" 
        $x('wwvFlowForm').method="post"
        $x('wwvFlowForm').submit();
    </script>
    Edited by: kias on Oct 4, 2012 5:38 PM
  • 4. Re: how to submit page on load
    JohnMackanzi Newbie
    Currently Being Moderated
    <script type="text/javascript">
    $(document).ready(function() {
    // renaming page items to name which you need on called page, values of page items you can set in process Before Header
    $x('P2_SML').name = 'docid';
    $x('P2_PAGE').name = 'page';
    $x('P2_AREA').name = 'area';
    $x('P2_USERNAME').name = 'username';
    $x('P2_PASSWORD').name = 'password';
    $x('wwvFlowForm').action="http://somewhere/something?"
    $x('wwvFlowForm').method="post"
    $x('wwvFlowForm').submit();
    </script>


    hi Kias !

    i have three page item to submit when it loads 1- selct category 2- select product 3 - item, and my page is first page after login window. means when u typoe in username password this page appears.

    Now please guide me where to write java script and how to call these three item in before header process.

    thanks
  • 5. Re: how to submit page on load
    782187 Newbie
    Currently Being Moderated
    Hi Omzz,

    question? Where you fullfill three page items (select, select, text)? You want to fullfill these items when page (first page after login) loads and then submit items to next page in application?

    Kias

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points