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

Similar Messages

  • 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#

  • 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

  • Javascript on Button displayed among this region's items?

    Hello,
    I have implemented Javascripts to used manual LOV, has well describe in "How To", and everything work well.
    I now want to put a button in my LOV page to return back a fix value to the calling page/item. From this button, I'm calling the javascript javascript:passBack('fix_value');
    If I put this javascript in URL Target of a region button, it is working well.
    But position of the button is not what I want. If I try to use a "button among region items" and I define a branching with URL target equal to the same javascript, I get a page not found error.
    Is there an easy solution for this?
    Thank you
    Jean

    check out whether this helps you.....
    when we create a button then automatically javascript:doSubmit("request") function gets attached to it and in this function , current page is submitted.
    If you have created the button among the region items , then i am pretty much sure that you wanted to display this button adjacent to some item (let us say A ) in the region
    If above assumption is right then i think it is better to use a IMG tag (displaying the button ) in < Post Element Text > of item A instead of creating the button in the region...
    e.g then you can put the same in <Post Elment Text > of item A of the region
    <IMG SRC="img src"
    alt="Query" border="0" align="bottom left"
    onclick = "<call javascript>">
    here you can
    1. use HREF to redirect ....then no need of javascript function
    2. put "#" in HREF and use a javascript function to re-direct...
    i have used this approach extensively and it works fine ...plus it gives you freedom to exactly place the button where you wanted on ur page ...
    P.S. i tried creating doSubmit(request) function on the page and thought that this function might override the HTMLDB's doSubmit function ..but it did not work
    ----------------------------------------------------------

  • How can assign the value returned from javascript to Hidden item

    Hi All,
    I have created a report with button in one column adding following code to SQL select statement like
    SELECT USER_RQST_ID, USER_RQST_DESC, RQST_DATE, STATUS, USER_ID, CNTRY_ID, KPI_LIST, YEAR_LIST, QTR_LIST, MONTH_LIST,
    PROD_LIST, FULL_PERIOD_FLG, GEN_DATE, '<input type=button value="view_list" onclick="javascript:doSubmit('||USER_RQST_ID||');">' button FROM KPI_USER_RQST;
    Then i have implemet doSubmit() function in Javascript like
    function doSubmit(req_id)
    html_GetElement('HIDDEN_ITEM')= req_id.value;
    Here HIDDEN_ITEM is the name of the item, I want to use that HIDDEN_ITEM value in PL/SQL block like...
    BEGIN
    INSERT INTO SAMPLE(KEY) VALUES(:HIDDEN_ITEM);
    END;
    But it is not working, Please help me anybody know the solution How to assign an item in javascript block function.
    Thanks,
    Neel

    Hello,
    doSubmit() is one of the built in javascript functions in apex and it's a bad idea to override it unless you know exactly what you are doing, and even then is a generally bad idea.
    change your function to this
    function mySubmit(pValue){
    $x('HIDDEN_ITEM').value = pValue;
    doSubmit();
    then your onclick will look like this notice the lack of the javascript: and the three ''' quotes to get the proper quotations for your value.
    onclick="mySubmit('''||USER_RQST_ID||''')"
    And there you go
    Carl

  • How to display Session value of an item  using Javascript?

    Hello All,
    I have a file browse item and I browse some file and click on upload, i run this javascript :
    function passBack()
    javascript:doSubmit('UPLOAD');
    alert('hi');
    var var_flag = $x('P91_FILE');
    alert(var_flag.value);
    opener.document.forms["wwv_flow"].f05[3].value = var_flag.value;
    close();
    </script>
    It dispalys 'hi ' as per the first alert.
    For the second alert it shows the file path value . ( C:\test\test1.sql).
    I need the file session value to be displayed here
    Like the following :
    F477093380/test1.sql
    and then I need to pass that value to parent page. and close the child page.
    Any idea?
    Thanks in advance.
    Regards,
    Archana

    Archana,
    I'm not sure about javascript, but u can use a sql query on the "APEX_APPLICATION_FILES" view to obtain that.
    Something like:
    SELECT id,NAME
      FROM APEX_APPLICATION_FILES;

  • Jsessionid giving Javascript error HELP!!

    I am getting this javascript error:
    Line:0
    Error:'AD8AFG45678545RFFGTYYY' is undefined.
    If you do view source, this is what you see:
    LINKHERE
    I understand all the URL Rewriting that's going on (I am using Tomcat 4.1.12), what I don't know is why I'm getting this javascript error and if there is a way around it.
    TIA

    If you cannot prevent URL rewriting for javascript links,
    you can use a link like:
    <a href="javascript:doSubmit(document.SearchForm);[b//[/b">LINKHERE</a>
    which should be rewritten as
    <a href="javascript:doSubmit(document.SearchForm);//;jsessionid=AD8AFG45678545RFFGTYYY">LINKHERE</a>
    As the jsessionid part is in a javascript comment, it will cause no error.

  • Checkbox and javascript onClick

    I have defined an sql region with the following query:
    SELECT HTMLDB_ITEM.CHECKBOX(1,serviceid) " ",
    servicedescription
    FROM service
    where coid = :P1_COID
    ORDER BY 2
    Although I read a few threads and Howtos about Javascript I didn't achieve my goal to redirect (submit) the page to itself everytime the checkbox is changed. I tried to manage this by setting
    onClick="javascript:doSubmit('Submitted');"
    in the element attribute of the serviceid column but with no success.
    Besides this I would like to analyze which checkbox (service) is checked. According to the selected services different regions should be shown/hidden on the page. May be someone could point me to the right direction.
    Thanks Tobias

    I solved it by myself...
    Tobias

  • DoSubmit in textfield_autofilter.js

    Hello,
    I want to add a doSubmit in the textfield_autofilter.js.
    Since I don't have any Javascript experience, I was hoping someone could help me where the code can be placed best.
    What I am trying to achieve :
    Run a oracle reports with parameters:
    I Created region with fields that act as parameters and a button which opens a URL to run the report. The parameter fields need a submit else the fields are not filled.
    This works ok for most of the items using onchange="javascript:doSubmit();"
    I have created one item which uses autofilter.js. I need the catch the value in that field.
    Tried it with form element attributes onchange="javascript:doSubmit();" but this does not always returns the correct value.
    Example return values:
    Key Enter : Ast
    Select list gives : Astrid
    when Astrid is selected with the mouse the value Ast is returned.
    I thought maybe I can put the doSubmit in the javascript......
    or if there are any other suggestions please let me know.
    If I am not clear please let me know.....
    Thx,
    Astrid

    :) ...and do I get any points for that? ;)
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Buttons & Javascript

    Greetings,
    I have a PopUp (called by the popUp2() function) that I want to save and close immediately after saving by clicking an Enter Comment button. I have that working (with some help on the forum, thanks).
    The initial Enter Comment button is a region button with this in the URL Target:
    javascript:doSubmit('CREATE');window.close();
    This works perfectly.
    I want to move the button below an item, so I created a javascript button that executes a javascript function when clicked. The code for that button is:
    <input type="button" onclick="button_Action()" value="Enter Comment" />
    As you can see it calls the button_Action() function. This is the code for that function (which is in the HTML Header):
    <script>
    function button_Action(){  
    doSubmit('CREATE');
    window.close();
    </script>
    When I click the javascript button the window closes, but the page is not submitted (the comment isn't created). If I remove the window.close() the page is submitted and the comment entered, but the window doesn't close! Arrgh! :-)
    I'm stumped. Why does the javascript work differently when it is in a function as compared to being in the URL Target?
    Also, what do I need to do differently to get it to work the way I want?
    Thanks, Tony

    Hi Andy,
    Thanks for the info.
    Below is what I have in my PL/SQL, how does it look?
    BEGIN
    -- Closes this popup window.
    htp.p('<body>');
    htp.p('<script type="text/javascript">');
    htp.p('window.close();');
    htp.p('</script>');
    htp.p('</body>');
    END;
    There must be something wrong, because it doesn't close the window.
    I simply have it running after the DML process, it isn't even conditioned. It excutes after the page is submitted.
    Thanks, Tony

  • DoSubmit('UPDATE')

    I have a button called UPDATE on the screen.
    I want to use javascript to do same thing as click at UPDATE button.
    Here is what i did in my javascript,
    doSubmit('UPDATE');
    but it doesn't work.
    Did I miss anything?
    Thank you.

    I have a button GOHOME on the screen.
    If I click GOHOME, a popup message box to ask yes or no. If yes, I want to do some function which is same as clicking on UPDATE Button (or I can run a update query), then do GOHOME. If no, just do GOHOME without updating.
    I did this doSubmit('UPDATE'), but this doesn't work.
    Thank you.
    Edited by: user628655 on Nov 2, 2009 8:39 AM

  • How to combine a doSubmit and a f?p call ?

    Hello,
    I've got an updateable report with a link column. That column is defined in my SQL query (select '<a href="f?p=&APP_ID.:4:' ||:APP_SESSION || ' ...) . That link is an image.
    When the user click on that image, I'd like to simulate the doSubmit('MyButton') function, but I can't manage to combine the doSubmit and the f?p call.
    If I write <a href=javascript:doSubmit('MyButton');f?p=...
    => it only executes the doSubmit.
    If I write <a href=f?p=.... ;javascript:doSubmit('MyButton');
    =>It only executes the f?p.
    Have you got an idea to combine both f?p and doSubmit ?
    Thanks
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Cyril,
    You can either submit a page, or you can go to another page by clicking on a link. In HTML DB those links start with f?p. Your after-submit computations, validations and processes are only executed if you actually submit a page. If you want to submit a page by clicking on a report link, you need to use some Java Script that submits the page and a branch to specify where to go next, e.g. return to the same page. The following thread contains more detailed information about how to do this, and how to keep track of which column link the user actually clicked on:
    Submit page before launching report link
    Regards,
    Marc

Maybe you are looking for