DoSubmit in javascript

I have a form in APEX, the html items are generated through HTP.P.
On submit button, I capture the form values in javascript and submit the page, so that the PROCESS gets called to insert the captured data on the form.
But the process never get called and I get error message "The requested URL /pls/apex/wwv_flow.accept was not found on this server."
It calls the process if I remove the form elements generated through HTP.P.....
Please help
tnx
Sanjeev
Edited by: user595983 on Sep 17, 2009 7:38 AM

Sanjeev,
If you place your own HTML elements (items, select lists, etc.) on the page via htp.p, that is going to confuse APEX. wwv_flow.accept is a function that expects a specific set of parameters. The items that you are adding to the page manually are also being passed to wwv_flow.accept, and it's failing as it does not expect them.
It's the same as if you had a simple function "f", that took one parameter "p". If you passed it a parameter "x", it would also fail.
Thus, if you need to dynamically create items, have a look at the APEX_ITEM API, which is designed to conform to what APEX expects to be submitted.
Thanks,
- Scott -
http://sumnertechnologies.com/
http://spendolini.blogspot.com/

Similar Messages

  • Upload large file on doSubmit in javascript

    Hi all,
    I'm currently having some problems uploading large files using a custom Upload button (button calls doSubmit from javascript).
    When using an Upload button with unconditional branch to the same page (no js) it works perfectly. Now I have to use my own Upload button that calls some javascript and AJAX and then Submit the page (with doSubmit); in this case I can only upload very small files (< 100k) ...
    I understand the mechanism of the file browse and its uploading to the table WWV_FLOW_FILE_OBJECTS, but I cannot figure out why my configuration does not work when it does stricly the same but from js ...
    Someone experienced the same issue ? How to submit the upload in javascript side with doSubmit ??
    Best regards,
    Othman

    Hi Othman,
    did you find a solution for this. I'm facing nearly the same problem, I'm calling a popup, where the user can upload up to 5 files. Then on clicking a button, javascript is called, that's calling the doSubmit and some others things and at the end the popup is closed.
    Sometimes the upload of 5 files is working, sometimes only 1 file is possible (obvisiously it's depending on the filesize).
    function addFile()
    doSubmit('FILE');
    opener.actualizeProject('TAB4');
    close();
    }chrissy

  • How do i see which parameters are being passed to wwv_flow.accept?

    Greetings everyone,
    After submiting a page i get this error:
    "The requested URL /pls/apex/wwv_flow.accept was not found on this server."
    I placed some inserts inside my page process to check and i found out the process isn t even being executed.
    This post seems to have some similarities to what is happening to me:
    doSubmit in javascript
    But all the items i need to change are being changed with javascript in the same page, after submiting they get the new values.
    What gets weirder is that it works properly in firefox and google chrome browser, however it is company politics that all aplications work in internet explorer and in internet explorer it doesn't work.
    So i would like to know how to see what is being passed to wwv_flow.accept so i can discard that option?
    Regards Pedro

    Greetings,
    I am working with Pedro Mendez in the same project.
    To give you more information about the problem, here is an example of the html structure in the page, just the div wich is causing problems:
    <div id="empresas">
    <form id="empresas_form" method="POST" action="" name="empresas_form">
    <input type="checkbox" name="empresas" value="DEMO2"/>
    Empresa Demonstração ( Demo 2)
    <input type="checkbox" name="empresas" value="SPA"/>
    SPA
    <input type="checkbox" name="empresas" value="GRH2"/>
    GRH2 - Brodheim
    <input type="checkbox" name="empresas" value="DEMO3"/>
    DEMO3 DEMONSTRAÇÂO
    <input type="checkbox" name="empresas" value="GRH"/>
    GRH - IMO
    <input type="checkbox" name="empresas" value="OK"/>
    OK
    <input type="checkbox" name="empresas" value="VALSAN"/>
    Valentim Santos
    </form>
    </div>
    To my understanding the variable that shoudl cause problems would be empresas_form and not empresas, since empresas is just a div.
    I need the checkboxes to be inside a form or i can t access them and i need to perform operations on them, any suggestions?
    best regards

  • Strange behavior when pressing ENTER in a form page

    Hi there
    Please go to the address:
    http://apex.oracle.com/pls/otn/f?p=20104:4
    If you click the Create button, enter anything in the Name field and press ENTER while in the field, you will be taken back to the main page, the message Action Processed will be displayed, but no data will be inserted. If you click on the Create button though, it works fine.
    Have anyone seen this? Any explanation for it? How to fix it? I could not find any reason for this behavior (the Name field is NOT an always submit page when enter pressed field type).
    (btw the two pages are very simple, based on wizards without any customisation)
    Thanks
    Luis

    i guess, trying the input form, the input text field for Name is an item 'textfield submit on enter'. But what happens is that when enter is pressed no additionally submit information is send, which is the case with buttons. Buttons call the doSubmit('<BUTTONNAME>') javascript function on click, allowing the process to run when thee are set conditionally.
    Carl's answer by setting the process unconditional will also result this action will take place when another buton (without direct redirect) will fire this.).
    So additionally when multple buttons and processes some new javascript kan be used to do the right submit on Enter. Example:
    In Page header, or shared javascript import file create a JS function submitOnEnter
    function submitOnEnter(submit,e){
    var keycode;
    if (window.event) keycode = window.event.keyCode;
    else if (e) keycode = e.which;
    else return true;
    if (keycode == 13){
    doSubmit(submit);
    return false;
    }else{
    return true;
    Then with you're item you define the js-event onKeyPress to call the function submitOnEnter
    onkeypress="javascript:return submitOnEnter('CREATE',event);"

  • Problem with page submit and opening a popup.

    Hello All,
    Apex 3.1.2
    I have a button that submits a page and opens a pop-up. I'm new to javascript so I'm really hacking my way through this, so syntax tips are very useful :)
    I'm using the code below on the button, my popup opens but then my main page seems to refresh and immediately covers up the popup. How do I get the popup to stay in front of the main page? Is there a problem with my main page submit?
    Here's my URL target for the button...
    javascript:doSubmit('ADD_TO_GROUP');javascript:popUp2('f?p=&APP_ID.:2:&SESSION.::::P2_OPPORTUNITY_NUMBER: &P6_OPPORTUNITY_NUMBER.');
    Thanks Much!
    p.s. ADD_TO_GROUP is my button name, am I using that correctly in doSubmit? It seems like I can put anything there and I still get the same behavior.
    Edited by: blue4speed on Mar 24, 2011 8:33 AM - added p.s.
    Edited by: blue4speed on Mar 24, 2011 9:34 AM

    ThomasL wrote:
    p.s. ADD_TO_GROUP is my button name, am I using that correctly in doSubmit? It seems like I can put anything there and I still get the same behavior.
    --> Are your on/after submit processes conditional?
    For the javascript, you could also try to put the javascript code into an html region of your page, with condition set to a REQUEST value, or the value of an item that you set on submit.It looks like what's happening is the page is branching back to itself and that's why my the popup is pushed to the background. I created a conditon on the branch that said request != "ADD_TO_GROUP" (my button request). This kept the focus on my popup but gave me the error that the page had no branch!
    How do I get my main page to submit and the popup to appear IN FRONT of the main page?
    Thanks!
    Edited by: blue4speed on Mar 24, 2011 10:16 AM

  • Trying to identify my tabs in my tree navigator sql

    Hi
    I have a similar probem as in the post of "how to reference current tab on page zero"
    see url Re: How to reference current tab on page zero?
    I have 4 tabs and many pages. I want each tab, when clicked, to show only the pages on my navigator/tree on the left that apply to that tab.
    e.g. tab 1 has pages 4,5,6,7 that should be shown on the tree
    tab 2 (when clicked) should show pages 8,9,10,11 only on the tree.
    Also, I cant have multiple navigators on page 0 for each tab either.
    Basically, I want my navigator on the left hand side should be dynamic, based on the tab I click.
    I've gotten this far (select statement below), but I don't know how to reference the current tab that I've clicked on / the current tab is active (#TAB_NAME#)
    select "MENU_CODE" id,
    "PARENT_MENU_CODE" pid,
    decode(menu_type,'FL','<img src="#APP_IMAGES#folder.png" border="0"
    style="vertical-align:middle">&nbsp<b>' ||menu_description,
    'PG','<img src="#APP_IMAGES#pgm.png" border="0"
    style="vertical-align:middle">&nbsp<b>' ||menu_description,
    'PG','<img src="#APP_IMAGES#tree_group.png" border="0"
    style="vertical-align:middle">&nbsp<b>' ||menu_description) name,
    decode(page_name,null,null,'f?p=&APP_ID.:'||page_name||':&SESSION.') link,
    null a1,
    null a2
    from "CANELAB_NAVIGATOR" a, APEX_APPLICATION_TABS b
    where b.display_sequence = a.menu_group
    and b.application_id = :app_id
    and b.tab_name = #TAB_NAME#
    order by MENU_CODE
    When I hard-code the tab name to be 'P_MANAGEMENT' (the name of one of my tabs), it works.
    But when I put it in as in #TAB_NAME#, then I cannot see my tree and instead i see the error message
    Warning: Tree root ID "10" not found.
    Please help as urgently as possible?
    Ta

    Hi,
    Firstly, :APP_PAGE_ID will tell you what page you are on, so you could use that to query the tabs table and/or style your list to show the "current page"
    Secondly, the tabs are designed to issue a doSubmit('#TAB_NAME#') javascript call that triggers the submit of the page and passes whatever value #TAB_NAME# is as a request value. You can capture this, but this should be done outside of any page:
    1 - Go to Shared Components, Application Items and create an item called, say, G_TAB
    2 - Go to Shared Components, Application Processes and create a new computation. This should be PL/SQL and should be in the "On Submit: After Page Submission - Before Computations and Validations" process point. The code for this should be:
    BEGIN
    :G_TAB := APEX_APPLICATION.G_REQUEST;
    END;Now, *:G_TAB* or v('G_TAB') is available to use wherever you need it.
    Note, though, that this would be updated to any request value that triggers the submission of a page (including buttons) and would not have a value when the first page is loaded for the first time. You should, therefore, update the above code to only update the G_TAB value when APEX_APPLICATION.G_REQUEST is in a specific range of values - it would help here if your tab names followed a naming convention (perhaps, "T_.....") so that you could use LIKE. For the first page, you could create an Application Computation that sets G_TAB to a Static Assignment of whatever the tab name is for your first page.
    Andy

  • Button Templates

    Hallo,
    Has anyone written a butten template? Could you post some templates that use a real html button instead of the table with link button? Which Substitution String do I have to use obligatory in a Button Template to get them work properly? Where could i place the #LINK# string correctly?
    I tried the following for a button template, that did not work:
    <input type="BUTTON" value="#LABEL#"
    onClick="javascript:doSubmit(onClick="javascript:this.disabled=true; redirect('#LINK#');"
    style="height:25px;width:75px;font-family:Tahoma;font-size:11px;background:#dfdfdf url(#WORKSPACE_IMAGES#bnt.gif) repeat-x;">
    thx in advance, willi

    Hallo,
    Pardion, I a was a little bit impatient.
    Use the follwing to create a new button template using a html button:
    <input type="BUTTON" value="#LABEL#" onClick="#LINK#" />
    If you like it with a nice style then try the following:
    <input type="BUTTON" value="#LABEL#" onClick="#LINK#" style="height:25px;width:75px;font-family:Tahoma;font-size:11px;background:#dfdfdf url(#WORKSPACE_IMAGES#send_doc_btn.gif) repeat-x;" />
    have fun, willi

  • APEX 3.1.2 javaScript:doSubmit don't able navigate BUG

    Hi everybody,
    We're working with APEX 3.1.2.
    We're not able to navigate from page to page with the Thumbnails.
    It seems that the javaScript:doSubmit doesn't execute.
    In our example we want to go from 'Généralités' page to 'Paramètres' page:
    javaScript:doSubmit('T_PARAMÈTRE');
    Can you help me ?
    Thanks & Regards.
    Eric.

    HI everybody,
    I apologize, when I say ``Thumbnail`` it means ``Tabs``.
    Anybody had never get this bug yet ?
    Thanks & Regards.
    Eric.

  • Javascript:dosubmit  - error

    i have just build application.. and i don't know what happened every javascript:dosubmit button on page 1 give me an error
    look at picture
    http://img526.imageshack.us/img526/8498/47216945.jpg
    any suggestions?
    i can't build it again, please help :(

    check your after submit validations, computations, processes and branches for any select ... into ... statement. Also check if any of these call a procedure or function in which there may also be a select into statement.
    cheers,
    Jure

  • The function javascript:doSubmit not passing variables between pages

    Hi,
    I have an report that has a link to another page, and I'm trying to pass 2 variables. If I use a target URL as such the variables do not get passed, but if I use a page target and explicitly add the item name and values it works fine. Here is the call I'm using to javascript:doSubmit:
    javascript:doSubmit('f?p=&APP_ID.:32:&SESSION.::&DEBUG.:32, CIR:P32_PROJ_ID,P32_DID:#AWARD_NUMBER#,#ID_PROVIDED#');
    Does anyone have any insights?
    Thanks,
    Joe

    You can't use doSubmit to pass variables; it will only submit your page with the request you passed in.  All normal page processing and branching will be followed..  Why are you using doSubmit?  Just put the URL in the URL field.
    f?p=&APP_ID.:32:&SESSION.::&DEBUG.:32, CIR:P32_PROJ_ID,P32_DID:#AWARD_NUMBER#,#ID_PROVIDED#

  • Javascript: doSubmit()

    I would like to do something like
    javascript:doSubmit('foo');alert('&ITEM.');
    There is a After Submit process (for request=foo) that calls a PL/SQL procedure and sets the value of :ITEM.
    It doesnt seem to be working. The page is submitted but the JS alert box is shown before the after submit process has completed, thus showing the incorrect (older) value of :ITEM
    Am I doing something wrong, is there another way to do this?
    Thanks

    html source. You could branch back to the same page
    and emit the same javascript to get an alert box with
    the submitted value. How can I do this? What would I put in the region/item source? I thought JS alert boxes only launched by user explicitly clicking something.
    Of course the alert would have to be in
    an item or region that was displayed
    conditionally based on whether it was a
    pre-submit or post-submit-and-branch rendering caseNot sure how I can do this either. Could you elaborate?
    The page is submited by doSubmit('foo'). The after submut process does its thing and sets the value of &ITEM.. The page has a branch back to itself. Now what?
    Thanks

  • Button javascript dosubmit

    hello,
    i have a button that submits the page.
    I want to show an alert box, if certain conditions are met ( for example, text box is empty ) and do NOT submit the page - redirect to this same page. If those conditions fail, then continue with doSubmit flow.
    // I do know that this can be done using the validation tab, but i'm just curios how to implement this in javascript.
    thank you.
    Andrew

    Andrew,
    With Apex 4 this is supposed to become much easier. If you'd like to do it now it's a bit more work. You basically change the button to call a custom JavaScript process which will in turn call doSubmit if/when you want it to.
    You do this by setting the button's Optional Redirect to URL and then putting something like the following in:
    javascript:validateMyItems();Of course there'd have to be a function of that name to do the job. Warning - JavaScript validation should not replace server side validation - it should supplement it.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Javascript:doSubmit action

    Hi all,
    1. I've created an updatable report with buttons in each row.
    2. A click on the button would create a form in the adjoining cell using JS.
    3. When I click on "Save" in that form a table is updated with the comment entered.
    4. At this point I want the page to refresh too. I've tried by using the
    doSubmit('REFRESH_PAGE233');
    and created -
    a. a conditional dummy process which will run if Request = REFRESH_PAGE233
    b. a conditional branch in the page which will redirect to the same page acheiving the page refresh when Request = REFRESH_PAGE233.
    However this does not seem to work for me. Ant suggestions ?
    The application is http://apex.oracle.com/pls/otn/f?p=17276:19
    Thanks,
    - Yogesh

    Looks like someone is testing this app.
    I set the status to 'N' and comments back to null
    so that all the rows appear back in the first report.
    - Yogesh

  • Where the Javascripts files for  functions like doSubmit and confirmDelete?

    Hi,
    I am asking me where Oracle stores the built-in JS functions.
    In the database or filesystem ?
    Thanks
    Bertrand

    Bertrand,
    They are in the file system in a directory referenced by the alias "i". If you're using XE on Windows this may be a little confusing as it uses Webdav.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    http://sourceforge.net/projects/plrecur

  • Open and Close Popup With Javascript

    Using Apex 3.2
    I have probably done this loads of times in my old job, but do not have access to the code and today I just can't get it to work properly.
    I have opened a pop up window with javascript
    Now I need to close it and refresh the calling page, but only if it passes the validation on the popup.
    I have a hidden item on my pop up called P7_FLAG.
    I have a page process after validation that sets P7_FLAG to (only set to 1, if passes validation).
    I also have a SUBMIT button.
    So once I click my SUBMIT button the page should look at the validations, if ok, set P7_FLAG to 1, then close the popup and refresh the calling page.
    My current javascript look like this
    <script type="text/javascript">
    function saveChanges(){
    doSubmit('SUBMIT');
    var test = $x('P7_FLAG').value;
    if(test == '1')
    window.close();
    window.opener.doSubmit('REFRESH');
    </script>On my button
    javascript:saveChanges();The problem is that I need to click the SUBMIT button twice.
    First time it sets P7_FLAG
    Second time it closes page and refreshes.
    I have probably made some basic error, but today I cannot see it.
    Cheers
    Gus
    Edited by: Gus C on May 10, 2012 12:48 AM

    <script type="text/javascript">
    function saveChanges(){
    doSubmit('SUBMIT');
    var test = $x('P7_FLAG').value;
    if(test == '1')
    window.close();
    window.opener.doSubmit('REFRESH');
    </script>javascript does not wait for the current action to complete and then perform the next line.
    means in your function call
    doSubmit('SUBMIT');is triggered and it carry on's to next line that is
    $x('P7_FLAG').value;this will not be set because you are setting the value of P7_FLAG to 1 in plsql and trying to check in javascript, which will not work.
    what you need to do is amend your js function like below
    <script type="text/javascript">
    function saveChanges(){
    doSubmit('SUBMIT');
    </script>create a page branch to procedure and make it conditional to when P7_FLAG = 1
    and set the branch source to below
    htp.p('window.close();');
    htp.p('window.opener.doSubmit(''REFRESH'');');

Maybe you are looking for

  • MAcbook blocked due to wrong password, how to restart it ??

    My MacBook pro is blocked,answering me password to restart ... I write the password I think good but everytime I try,it says to me that password or Username is wrong ! I don't understand but now i'm really blocked and can't use the Mac Is someone abl

  • After upgrade conky does not display right on first boot

    After i upgraded my arch conky will display on top of all windows when i first boot the machine, until i kill it and restart it then it works perfectly. I am using openbox with no compositing.

  • Can't open one spreadsheet.

    I am running Numbers '09 2.3 on an OS X 10.9.2 Mac Book Pro.  I can open other spreadsheets but not one that I use fairly often. It says I need a newer version of Numbers to open this spreadsheet.  But why should I when it was created and has always

  • Where should DNG profile editor install the .dcp file?

    Just made my first attempt to create a custom camera profile using the X-Rite color checker passport and the DNG Profile Editor. Thanks to the excellent tutorial, the process went smoothly.  Next I took the final step of exporting the profile (.dcp)

  • Adding H.264!!

    Argh, this should be simple but its frying my brain and I have to ask for help which I hate doing because it should be easy.I'm using dreamweaver CS4.Recently I have decided to replace all FLVV content with H.264.I have produced H.264 videos with the