Simulate "When button pressed" condition

I created a button a page (in region position).
When I go to the Edit page for the button, the Optional URL Redirect section says "No target".
I have a After Submit process on the page that has its "When button pressed" condition set to that button.
Now, before firing the process, I would like to popup a Javascript confirm box that checks some value on the page and if it is ok, it submits the page
So, I went to the URL redirect section on the button and changed the target to URL and specified the following URL
javascript:{if (document.getElementById('SOME_ELEMENT').value=='foo' || confirm('Are you sure?')) doSubmit('BUTTON_NAME');}
Now, what change do I need to make to the After Submit process to simulate the 'When Button Pressed' condition? Or would it automatically know that the submit was (indirectly, via the doSubmit) due to the button being pressed and accordingly fire?
Hope I explained this clearly.
Thanks

Actually, I didnt need to change anything in my After Submit process. I still had it execute with no conditions and a 'When Button Pressed' of BUTTON_NAME and it worked fine! I didnt need to use the REQUEST value anywhere.
Is this just a co-incidence, did I get lucky or is this the way things are supposed to work?
javascript:{if (document.getElementById('SOME_ELEMENT').value=='foo' || confirm('Are you sure?')) doSubmit('BUTTON_NAME');}
Or would it automatically know that the submit
was (indirectly, via the doSubmit) due to the
button being pressed and accordingly fire?The answer to my question above would seem to be "yes". Is that right?
Thanks

Similar Messages

  • When button pressed: Multiple buttons

    Regarding the 'When Button pressed' condition available in various places (computations, branches, processes, etc), it offers me the option to select exactly one button.
    How can I make it so that I want the thing to fire when either Button 1 or 2 or 3 is pressed?
    Thanks

    Martin - Whenever a page is submitted with a button, the request value is set to a property from the button, either the button name for standard buttons or the request value attribute for item buttons. In either a PL/SQL expression condition or in some of the declarative condition types that look at the request value, you can compare it to a list of values that you're interested in.
    Note that the request value doesn't necessarily tell you which button was pressed. It tells you that some event set the request value. If your page can be submitted with a tab or with javascript that you put somewhere on the page, or if you've given multiple buttons the same request value, it's up to you to prevent ambiguity about the button-to-request mapping.
    Scott

  • Error -- No Such Trigger('when-button-pressed')

    Hi,
    I am getting the error ""No Such Trigger('when-button-pressed')"",
    when I am executing the code EXECUTE_TRIGGER( 'WHEN-BUTTON-PRESSED' );
    on some item(Key-Next-Item), although WHEN-BUTTON-PRESSED trigger exists.
    What could be the problem ?. It worked till yesterday, giving error from today, I havent
    changed any thing.
    Thanks in Advance
    Devender

    Steve's tip is the only good solution for this case.
    The problem in your case for example is:
    Let's say you have a block-trigger, which fires after your execute-trigger.
    Now a colleague of you, which don't know your code, create a WHEN-BUTTON-PRESSED on an item, then the new code is started and not the block-trigger-code.
    So, don't ever do this. Write your code in a package-function or -procedure and call it from the trigger. So you can re-user the functionality
    Gerd

  • Calling a report from forms - FRM-40735 when-button-pressed raised unhandle

    Hi,
    I created a form to generate a pdf report.
    its not going too well, so i need some help.
    my form only has one button , when pressed I want it to generate a report in pdf format.
    i created a when-button-pressed trigger and the following code is below:
    I also create a web service proxy jar file,
    the jar file is in the FORMS_BUILDER_CLASSPATH, and the jar file is imported from forms builder without any issues.
    As of now I am hard coding everything in the code below to see if it works.
    The error I am getting  FRM-40735 when-button-pressed raised unhandled exception ORA-105100 i dont know why ?
    This error is occurring at this line of code, please help, this is my first time doing something like this.
    obj := publicreportserviceclient.new(); DECLARE
    param_name varchar2(200);
    un varchar2(200);
    pw varchar2(200);
    out_file varchar2(200);
    obj ORA_JAVA.JOBJECT;
    BEGIN
    obj := publicreportserviceclient.new();
    param_name := 'EMP';
    un := 'Administrator';
    pw := 'Oracle123';
    out_file := 'D:\DevSuiteHome_1\j2ee\home\default-web-app'||'output';
    publicreportserviceclient.callRunReport(obj,'/~administrator/Learn/Test1/Test1.xdo','EMP','141414',un,
    pw,'pdf','New_Template',out_file);
    web.show_document('http://jmenge-de.de.oracle.com:8889/j2ee/' || 'output');
    exception
      --check for ORA-105101
      when ORA_JAVA.EXCEPTION_THROWN then
         message('Java Exception : '
          || Exception_.toString(ORA_JAVA.LAST_EXCEPTION));
          ORA_JAVA.CLEAR_EXCEPTION;
          return;
      --check for ORA-105100
      when ORA_JAVA.JAVA_ERROR then
                   message('Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR);
              return;
    END;This is my java function
        public void callRunReport (String reportPath, String paramName, String  paramValue, String
        username, String password, String format, String template, String outFile) {
        try {
                bip_webservice.proxy.PublicReportServiceClient myPort = new bip_webservice.proxy.PublicReportServiceClient();
                // Calling runReport
                ReportRequest repRequest = new ReportRequest();
                repRequest.setReportAbsolutePath(reportPath);
                repRequest.setAttributeTemplate(template);
                repRequest.setAttributeFormat(format);
                repRequest.setAttributeLocale("en-US");
                repRequest.setSizeOfDataChunkDownload(-1);
               ParamNameValue[] paramNameValue = new ParamNameValue[1];
                paramNameValue[0] = new ParamNameValue();
                paramNameValue[0].setName(paramName);
                String[] values = new String[1];
                values[0] = paramValue;
                paramNameValue[0].setValues(values);
                repRequest.setParameterNameValues(paramNameValue);
                ReportResponse repResponse = new ReportResponse();
                repResponse = myPort.runReport(repRequest,username,password);
                byte[] baReport = repResponse.getReportBytes();
                FileOutputStream fio = new FileOutputStream(outFile);
                fio.write(baReport);
                fio.close();
            } catch (Exception ex) {
                        ex.printStackTrace();
        }Thanks - please help

    If there is a way to make it work with Bi publisher, Please let me know.
    I need to something to make it work with BI publisher.
    thanks,
    Edited by: Rooney on May 27, 2010 1:27 PM

  • How can I call my chart in Forms6i on When Button Press Trigger?

    Hi Friends,
    I have make a chart in Graphic Builder 6i and save on path C:\graph\test.ogd
    Now I want to run this Chart from Form6i on When Button Press trigger.
    I have call my report in forms using this command on When Button Press trigger.
    Run_Product(reports,'C:\Cheema\Qdir_store\reports\pmms\sec_backlog',asynchronous,runtime,filesystem,TO_CHAR(NULL));
    So tell me How can I call my chart in Forms6i?
    Please reply me on urgent.
    Thanks,
    Shahzad

    Just to recall after a long break of couple of years..... Pls check out if not wrong.
    First of all you need to embeed the chart object on your layout window and make it visible = FALSE. This is a design time work. In the button press event, show the chart object by setting the visible property = TRUE.
    Note, i could not paste u the sample code as i don't have forms installation on my PC. The above states is a logic you can apply.

  • Looping through a table Help needed ....Forms 10g..... When Button Pressed

    Hye craig, hamid, christian and all ...........
    i have a user access interface which i create where there are two fields username and password and a button,
    i have also created a table USERS for users which have username and password fields ..... On useraccess interface i coded on WHEN BUTTON PRESSED like this
    declare
    go_block('users');
    execute_query;
    declare
    begin
         if :useraccess.username=:users.username and
              :useraccess.password=:users.password then
              go_block('MAINPAGE');
              else
              go_block('USERACCESS');
              MESSAGE('SORRY WRONG PASSWORD OR NOT A REGISTERED USER');
              MESSAGE('SORRY WRONG PASSWORD OR NOT A REGISTERED USER');
              end if;
    end;
    This code works for a single user in USERS table but for multiple users there has to be some looping system
    which matches the USERACCESS and USERS tables fields thoroughly ....

    Hi Majid,
    I can suggest you a workaround for this. raise a ON-LOGON trigger and you can use the LOGON_SCREEN builtin to flash the logon screen at runtime. And then try capturing the username and password.
    DECLARE
      connected BOOLEAN := FALSE;
      tries     NUMBER  := 3;
      un        VARCHAR2(30);
      pw        VARCHAR2(30);
      cs        VARCHAR2(30);
    BEGIN
      SET_APPLICATION_PROPERTY(CURSOR_STYLE, 'DEFAULT');
      WHILE connected = FALSE and tries > 0
      LOOP
        LOGON_SCREEN;
        un := GET_APPLICATION_PROPERTY( USERNAME );
        pw := GET_APPLICATION_PROPERTY( PASSWORD );
        cs := GET_APPLICATION_PROPERTY( CONNECT_STRING );
        LOGON( un, pw || '@' || cs, FALSE );
        IF FORM_SUCCESS
        THEN
          connected := TRUE ;
        END IF;
        tries := tries - 1;
      END LOOP;
      IF NOT CONNECTED THEN
        MESSAGE('Too many tries!');
        RAISE FORM_TRIGGER_FAILURE ;
      END IF;
    END ;   a sample piece of coding to help you out.
    Regards,
    Manoj Chakravarthy

  • Calling a function in WHEN-BUTTON-PRESSED

    Hello,
    i have in when-button-pressed a line containing
    select pachet_salarizare.ani_vechime(data_min, to_number(to_char(sysdate,'YYYY')), to_number(to_char(sysdate,'MM'))) into ani_vechime from dual;so i call a function which is in pachet_salarizare package (package created in program units, in Forms).
    when compiling, i get: function 'PACHET_SALARIZARE.ANI_VECHIME' mai not be user in SQL.
    how can i deal with this? i need the result of that function in a variabie, ani_vechime.
    Thanks!

    Uh, thank you. i thought it's not possible what i wanted..
    but strange why cannot be called function in select statements
    Regards,

  • Requerying in WHEN-BUTTON-PRESSED

    Hi,
    I have two forms. I have a button that opens up modal form 2 from form 1 and passes some parameters. I allow the user to update something in form 2 (which has an effect on form 1). When user exits form 2, I want to requery the block in form 1 so that any updates effected in form 2 can be visible.
    I tried putting in a do_key('execute_query') in the WHEN-BUTTON-PRESSED trigger in form 1 after the call to open form 2. This had no effect (probably because it didn't get called when I expected it to). The only way I am able to get the new data (after an update in form 2) is to manually issue a requery in form 1.
    Any suggestions would be deeply appreciated!
    Thanks,
    Niranjan

    Hi Niranjan
    Put the Execute_query in the when-new-form-instance of the Called form.
    With Regards
    Harish
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Niranjan Ramakrishnan:
    Hi,
    I have two forms. I have a button that opens up modal form 2 from form 1 and passes some parameters. I allow the user to update something in form 2 (which has an effect on form 1). When user exits form 2, I want to requery the block in form 1 so that any updates effected in form 2 can be visible.
    I tried putting in a do_key('execute_query') in the WHEN-BUTTON-PRESSED trigger in form 1 after the call to open form 2. This had no effect (probably because it didn't get called when I expected it to). The only way I am able to get the new data (after an update in form 2) is to manually issue a requery in form 1.
    Any suggestions would be deeply appreciated!
    Thanks,
    Niranjan<HR></BLOCKQUOTE>
    null

  • Ticker bean and WHEN-BUTTON-PRESSED trigger

    Hi,
    In Forms 6i, I use the Ticker bean. The problem with it, is that it appears on all canevas of my form.
    But if the bean is "stopped" (i.e. the clock is stopped), it works fine and it does not appear on the next canevas I show.
    However, I must have a button for the "stop" and another one that shows my next canevas. If I put the two code lines in the same WHEN-BUTTON-PRESSED trigger of a unique button, the ticker bean is still visible in the new canevas.
    Any help is appreciated.
    Regards,
    Olivier.

    Olivier,
    I think I remember having heard of this before. The reason for this could be that the ticker bean uses AWT classes, which are heavyweight. All you can try is to call
    synchronize;
    between starting and stopping the ticker if using one button only. If this doesn't help, then I don't know of any other solution that could work.
    Frank

  • When-button-pressed---adding a "select statement"

    Hi friends,
    i have a select statement:
    select count(*) from employees
    where emp_no=:control.emp_no;
    i would like that when i press a button, count for instance, i get the number of employees.
    I need the codes used in oracle in the when-button-pressed.
    Thanks.

    DECLARE
    RESULT NUMBER :=0;
    CURSOR CUR
    select count(*) from employees
    where emp_no=:control.emp_no;
    BEGIN
    OPEN CUR;
    FETCH CUR INTO RESULT;
    :ITEM_NAME := RESULT;
    CLOSE CUR
    END;
    I hope this will help
    This will be shown in item, if you want to show a message then use
    MESSAGE(RESULT);
    Regards
    Abbas
    Edited by: Abbas on Jul 19, 2011 12:37 PM

  • FRM-40732 ORA-06502 in when button pressed triger

    I Have a the code below in when button pressed
    If :block1.text_item is not null Then
    :control.title := :block1.text_item
    end if;
    go_block('block2);
    Here the when button-button-pressed unhandled exception Frm-40735 Ora-06502 appears. I know this may be because of datatype problem, but how would I know the culprit item. The form allow the user to save the data. Am using forms 6i 10G database.

    Can check the maximum length of :control.title
    It seems that it can handle the amount of data you are assigning to it

  • Frm-40735 when-button-pressed trigger raised unhandled  exception ora-03114

    hi everybody,
    i am using oracle 10g release 2 in my test server and 10g release 1 in production server with forms in 10g running through the oracle 10g application server with no problem with our production server.
    but the same form when i try to use through the same application server for my
    with my test database server which is oracle 10g release 2 is giving me
    frm exceptions and disconnecting the session.
    like i get frm-40735 when-button-pressed trigger raised unhandled exception
    ora-03114. then frm-40655 sql error forced rollback;clear form and reenter transaction. then when i try to exit it shows ora-24324 service handle not initialized.
    The same thing when i try with my production server i dont get any exception handle error or forced rollback error.
    i am not facing any problem as such to connect to my test database(release 2)
    through sql plus client or TOAD OR ENTERPRISE MANAGER THEY ARE ALL FINE. IT IS ONLY WHEN I GO THROUGH THE APPLICATION SERVER TO ACCESS MY FORMS I GET THIS ERROR. BUT MY PRODUCTION IS RUNNING THE SAME WAY WITH NO ERRORS.
    any suggestions welcome as i have to bring release 2 in the production next month
    thanks and regards
    manish

    ORA-03114 not connected to ORACLE
    Cause: A call to Oracle was attempted when no connection was established. Usually this happens because a user-written program has not logged on. It may happen if communication trouble causes a disconnection. In addition, this message could occur when ALTER SYSTEM KILL SESSION or ALTER SYSTEM DISCONNECT SESSION were issued with the IMMEDIATE qualifier because, in those cases, the client's connection to the database is terminated without waiting for the client to issue a request.
    Action: Try again. If the message recurs and the program is user written, check the program.
    zaibi.

  • FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-106561

    I m working on Fusion Middleware forms 11g with windows plateform. I want to launch an exe (like notepad.exe) from my form on button click, which i m doing using the webutil dde.app_begin. My form is deployed on server, and i want to launch this application from client. The server is on linux. Now when i press the button it gives me error "FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-106561". Here is my code:
    DECLARE
    AppID    PLS_INTEGER;
    BEGIN
    AppID := DDE.App_Begin('notepad.exe',DDE.App_Mode_Normal);
    END;
    Any help will be highly appreciable. Also, please tell me for any possibility, if i can call this exe from server, which is on linux.
    Regards,
    Sharjeel

    Any one there pls help me in this. I seen all the forums and threads, for this, but could'nt find any solutions.
    Any help will be highly appreciable.
    Regards,
    Sharjeel

  • FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-04063

    Hi experts,
    This problem as titled happened to me recently, and i found no way out.
    I collected the FRD information, what i can get is:
    GMDRCDSG, 11, Prog Unit, Entry, 361120504, /XGMDSRCHGMD_BASIC_SEARCH_PKG/INIT_GROUP
    Unhandled Exception ORA-04063
    State Delta:
    Error Message: FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-04063.
    ON-ERROR Trigger Fired:
    Form: GMDRCDSGORA-04063 means some database object is broken, but this information does not specify exactly which
    object it is . I thought it is caused by GMD_BASIC_SEARCH_PKG, which is programmed in GMDSRCH.pll.
    So i recompiled the pld file, but didn't work.
    The further action i took is to find out all the invalid package/package body in database, and recompile them.
    Unfortunately, this also didn't work.
    Any help is greatly appreciated, thanks in advance:)
    Ted

    Could anybody help? Please.
    Thanks,
    Ted

  • FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-29516

    Hi,
    The users are facing problem on opening the OAF pages on R12 instance.
    They face this error when they,
    1. Go to System Administrator responsibility.
    2. Open page under Workflow > Administrator Workflow > Status Monitor.
    3. This error pops up in the lower half of the form page.
    FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-29516
    However, this error doesn't happen when people make direct login from homepage. Kindly help and suggest what need to be done.
    EBS 12.1.3
    DB 11.2.0.2.0
    Thanks in advance.*
    Holi*

    Can you find any details about the error in Apache log files and the application.log file?Saw two files, error*.log, and access.log. Please suggest if I need to see some other files, I am new to R12 environment.
    error log
    n request for destination: application://forms (no island or jgroup).
    +[Fri Apr  1 09:05:04 2011] [error] [client 10.182.1.5] [ecid: 1301666704:10.10.241.79:3809:0:89,0] mod_oc4j: Failed to find a failover oc4j process for session request for destination: application://forms (no island or jgroup).+
    +[Fri Apr  1 09:05:48 2011] [error] [client 10.182.1.5] [ecid: 1301666748:10.10.241.79:2404:0:299,0] mod_oc4j: Failed to find a failover oc4j process for session request for destination: application://oacore (no island or jgroup).+
    +[Fri Apr  1 11:34:36 2011] [error] [client 10.11.219.90] [ecid: 1301675676:10.10.241.79:2404:0:414,0] File does not exist: /p01/app/applmgr/oappsp1/apps/apps_st/comn/java/classes//+
    +[Fri Apr  1 11:34:38 2011] [error] [client 10.11.219.90] [ecid: 1301675678:10.10.241.79:8458:0:332,0] File does not exist: /p01/app/applmgr/oappsp1/apps/apps_st/comn/java/classes//+
    +[Fri Apr  1 11:40:10 2011] [error] [client 10.11.219.90] [ecid: 1301676010:10.10.241.79:2562:0:467,0] File does not exist: /usr/local/oraapps/tmp/inst/apps/OAPPSP1_c201u334/portal/favicon.ico+
    access log
    +27.0.0.1 - - [01/Apr/2011:23:36:00 -0500] "HEAD /index.html HTTP/1.1" 200 0 0 "-" "-"+
    +127.0.0.1 - - [01/Apr/2011:23:36:20 -0500] "HEAD /index.html HTTP/1.1" 200 0 0 "-" "-"+
    +127.0.0.1 - - [01/Apr/2011:23:36:40 -0500] "HEAD /index.html HTTP/1.1" 200 0 0 "-" "-"+
    +10.32.16.114 - - [01/Apr/2011:23:36:55 -0500] "POST /forms/lservlet;jsessionid=3218513816b7b7e5c75d2c1e812eca1e21eb118fdac1cbb0d8eb1d618ee6ccbb.e3qKbN0Mc3yNe38Lb34KahuTbx10 HTTP/1.1" 200 2 0 "-" "Mozilla/4.0 (Windows XP 5.1) Java/1.6.0_07"+
    +127.0.0.1 - - [01/Apr/2011:23:37:00 -0500] "HEAD /index.html HTTP/1.1" 200 0 0 "-" "-"+127.0.0.1 - - [01/Apr/2011:23:37:20 -0500] "HEAD /index.html HTTP/1.1" 200 0 0 "-" "-"

Maybe you are looking for

  • Purchase order Revision and Releases

    Hello All Can any one tell me the keyfig for Purchase order Revisions and Releases.I am trying to built a report that has PO Revision count and PO Releases count. Any help would be appreciated Thanks

  • How can I take away the 1x1 transparent gif on my slideshows in muse?

    How can I take away the 1x1 transparent gif on my slideshows in muse?  It's showing up as a SEO error only on the pages that include slideshows. 

  • Document numbering issue - Incorrect documents opening from Reports

    We follow repetitive document numbering with different series name. During a customised report generation, the details displayed in the report are correct, but when I click on the document number from the report, it opens a different document with th

  • ITunes will not close

    Hi I have iTunes for Windows and I have a problem. Every time I try to close it it says "One or more applications are using the iTunes scripting service". I press quit and a couple moments later it opens again!!! Please help me!!!

  • Stolen Laptop - Is there any way to deauthorise it remotely?

    I have looked through the forums and support pages, but can't seem to figure out how to do this. I have changed my apple ID and password, so even if the thief gets past my system password they won't be able to buy anything on my credit card, but I wo