WHEN-WINDOW-CLOSED trigger

When the trigger fires I would like to exit the form even when the usr is in ENTER-QUERY mode. I can't get it to work with only one mouse click.
null

Try this :
If :system.mode = 'Enter-Query' then
Exit_Form;
End If;
Exit_Form;
null

Similar Messages

  • How to tell embedded jinitator applet is still running when window closed

    Hello, we are trying to accomplish the same thing that is mentioned in this post from Metalink. I've searched for a solution and hope someone here can help. Instead of restating the issue I think David Wilson does a good job of explaining what is needed. Can anyone please suggest a possible solution?
    From: David Wilton 07-Oct-05 01:08
    Subject: How to tell embedded jinitator applet is still running when window closed
    How to tell embedded jinitator applet is still running when window closed
    Hi,
    We run an oracle 10g forms application through 9iAS over an intranet. All users are running windows 2000 professional.
    We run separate frame = true but I would like to switch to separate frame = false
    With separate frame = true if the user clicks the outer windows "X" close button (forms mdi window) the user is prompted to save changes before the application ends.
    BUT
    when using separate frame = false
    If the user clicks the upper window "X" button (no longer form mdi window but regular browser window) the window and application is abruptly closed.
    I'm interested in using a onbeforeunload function to confirm if the user wants to close the window. This would be placed in the basejini.htm file. This could always ask if the user wants to exit or not. If they click OK then the window closes but if they click "Cancel" you are returned to the forms application exactly where you left. something like event.returnvalue="do you really want to exit?";
    However if the user exited using the normal exit form method then the applet is already closed before the onbeforeunoad event fires and there is nothing to go back to and I want the window to close automatically. This is accomplished using close.html file in post forms trigger.
    So what I want and what I think many may also want is the check if the embedded applet is still running and if so prompt the user to return to the application or continue to close. Of course If the applet is no longer running then just close because there is no reason confirm closing anymore.
    Does anyone have a html/JavaScript solution that can be placed in the jinitiator.htm file? or similar?
    Thank you
    David
    [email protected]
    From: Andrew Lenton 07-Oct-05 08:58
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    I don't know if this is exactly what you are after but you can add the following to the top of your basejini.htm file and it should prompt the user before exiting the IE window.
    <BODY %HTMLbodyAttrs%>
    %HTMLbeforeForm%
    <SCRIPT>
    <!--
    window.onbeforeunload = unloadApplet;
    function unloadApplet(){
    message = "Warning! Please exit the Java Applet prior to
    exiting the browser"
    return message;
    //-->
    </SCRIPT>
    From: Oracle, mohammed pasha 07-Oct-05 09:55
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    David,
    Well I could not understand your complete requirement.
    Refer to Note.201481.1 How to Close the Browser Window When Closing Forms And How to Simulate SeparateFrame By Javascript
    Note.115905.1 How to Close Browser Window When Closing Webforms Applet
    Kind Regards,
    Anwar
    From: David Wilton 07-Oct-05 14:37
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    Thank you for your reply and yes you did not understand my question fully.
    Sorry if this is a long reply
    I am able to close the browser window using information in notes 115905.1 and 201481.1, this is not the issue. We implemented this several years ago. It is workable for both separate frame = true or false.
    It is most important to not allow the user to end their forms application by closing the windows browser, they must close using normal form exit commands.
    What I want is to have separate frame = false, the big drawback to this option is the user can exit the application and bypass all forms code by pressing the windows "X" close button. This is why we need the code as just provided by Andrew Lenton above in this thread.
    BUT Andrew's code will always prompt the user before closing the window and I do not want that. I want the user to be prompted only under scenario 2 listed below.
    Here's the 2 case scenario for exiting the application.
    1. If the user closes properly and uses exit form which fires all normal form triggers including post_form with it's call to close.html file.
    All uncommitted changes are saved or rollback and the users session is ended normally both on the database and in the application server.
    All browser windows will close, great all is good. And without Andrew's code the window will close but with Andrew's code the user will be prompted to close or not, if they select Cancel the window will remain but the applet has already ended so why prompt? ...This is what I want to avoid.
    2. In the forms app. if the user clicks the windows "X" close button with uncommitted changes. The browser just closes the changes are rollback without prompting the user to save. The users sessions are now lost and still running in the database and application server until they are timed out.
    If I use Andrew's code then the user will be prompted to continue to close or go back, if they click Cancel to go back then focus returns to the forms application and the user can continue to work. If the user clicks OK then the window closes and unfortunately their sessions are still lost until timed out.
    So what I desire is to add to Andrew's code to check if the embedded applet is still running and prompt the user to close or not accordingly.
    Something like:
    Basejini.htm like
    </HEAD>
    <SCRIPT LANGUAGE="JavaScript">
    function maximizeWindow()
    window.moveTo(0,0);
    window.resizeTo(screen.availWidth,screen.availHeight);
    function confirm(){
    If(document.embeddedapplet.closed())
    Win.opener = self;
    win.close();
    Else if
    event.returnValue = "Closing Forms Application. OK to continue?";
    </SCRIPT>
    <BODY %HTMLbodyAttrs%, onload="maximizeWindow()", onbeforeunload="confirm()">
    %HTMLbeforeForm%
    I hope this explains my requirements.
    David
    From: Oracle, Evelene Raechel 10-Oct-05 06:45
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    Hi,
    Note.199928.1 How to Alert User on Closing Client's Browser Window in Webforms
    Regards,
    Rachel
    From: David Wilton 11-Oct-05 17:40
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    I'm sorry this is not helpful at all.
    Note 199928.1 is only an alert which does not stop the closing of the window and still displays as an alert if the user does close properly using exit form ... so why would you want to display the alert then?
    This is exaclty what I do not want and why I want to determine if the applet is still running before displaying any kind of message.
    David
    From: Oracle, Evelene Raechel 17-Oct-05 12:23
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    Closing thread.
    Thanks,

    Hello,
    I had the same issue last year - wanting to provide a warning on closing the browser, but only if the Forms session is still running. The approach I took is described below, see also the thread where I originally posted this at Closing brower window
    Hi there,I've had a similar requirement - or rather, the two conflicting requirements: to warn when the browser is being closed, but for the app to be able to close the browser without a warning being fired.
    To always provide a warning when someone (the user or the Forms app) tries to go to a different page (e.g. your close.htm), use Javascript like:
    function confirmExit(){
    if(appletRunning==true) {
    msg="Closing this window or navigating to another page will end your SomeGreatApp session.";
    window.event.returnValue=msg;
    And make a call to confirmExit() in the onBeforeUnload event of your main page.
    You'll notice I first check an 'appletRunning' variable before displaying the warning. This Javascript variable is set to true by my app when it starts up, using an embedded Javabean that calls out to Javascript. Once that variable is set to true, then the warning will be displayed if the user tries to shut the browser by clicking on the 'x' button, or to go to a different URL.
    When my app is shutting down, it uses the same Javabean to set appletRunning back to false. It then navigates to a close.htm - which will be done without a warning being displayed.
    See Re: How can a Javabean call Javascript function of the basejpi.html?? for example code on how to call Javascript from a bean embedded in your Forms app.
    Hope these ideas help you out, it's worked for me (so far, anyway!!)
    James

  • When-window-activated trigger not firing

    Hi,
    I got this scenario :
    Opens a form, the When-new-form-instance runs, the When-window-activated runs.
    But if a message is shown in the when-new-form-instance trigger, the when-window-activated wont run.
    Anybody whos got a solution for this, as I need the trigger to run.
    regards
    Kim

    It can be very simple as :
    plib_do_something_1;
    plib_do_something_2;
    message('Show a message on the screen');
    do_key('Enter_query');
    The thing is that its only if the message is showed as pop-up the problem exists. If I remove the 'do_key('enter_query')', the message is showed at the statusbar and the wwa trigger fires.

  • Safari crash when window closed

    Like the post earlier, safari crashes when a window closed. I used to have Speed Download, however, it is no longer on my system, and when i searched for it (and permutations of it I found nothing.
    I tried looking in the crash log, but I dont know what Im looking for.
    I would appreciate any further suggestions.
    Thanks

    Hello Illan Wall and welcome to discussions,
    Speed Down Load MUST be removed by using their own un-installer package that comes with it.
    Did you do that or did you just trash the Application?
    Hope that helps some
    Regards
    Ian

  • When window closed shows qms$trans_errors window

    Hello,
    I want to report the following problem, regarding qmslib65.pll, revision 6.5.1.12.
    To show the problem, I do the following actions:
    1. In my form I delete a record (which has details record, that are not shown in the form)
    2. I try to close the window and I see an popup window, asking me if I want to save the changes
    3. I answer Yes and due to the restricted relation between this record and its details I see a popup window, telling me that this delete action is not allowed.
    4. The next thing that happens is that the form is showing me the qms$trans_errors window with no information at all.
    My guess is that this is due to the qms$window.when_window_closed procedure, present in the qmslib65.pll, especially the follwing code:
    if l_last_window
    then
    if qms$errors.show_message('QMS-00158')
    then
    commit_form;
    if name_in('system.form_status') <> 'QUERY'
    then
    go_block('QMS$TRANS_ERRORS');
    raise form_trigger_failure;
    end if;
    else
    exit_form(no_validate,full_rollback);
    end if; -- show message
    end if; -- last window
    Notice the go_block('QMS$TRANS_ERRORS') line. In my opinion the violation of the FK restricted constraint is not handled by any business rule (qms$transaction) and therefore the go_block('QMS$TRANS_ERRORS'); statement is obsolete in this case.
    What I want to do know is create a workaround to avoid showing the qms$trans_errors window if no business rule is violated, when closing the window. Any ideas?
    With regards,
    William de Ronde

    This is known bug #2283122. It was fixed in Headstart patch 6.5.2.2, which is available via the supplement option.
    Basically, we added a bit of code to check the number of messages on the cg$errors message stack just before going to the QMS$TRANS_ERRORS block. We now only go to the block if the number of messages is > 0.
    Regards,
    Lauri

  • Execute a php file when window closed... onunload

    i wish to find a way to run a php file when the window is
    closed using the <body onunload="....">
    does anyone know how i can do this?
    any suggestions?
    thanks

    thanks for the responses.
    But the design is like that.Then it needs to be fixed.
    I think this is why there's a shortage of people to write computer applications, they are all wasting their time struggling to implement bad designs.
    its a scheduler to be run on tomcat where we interact
    with the running batch files and can't be changed.A scheduler in Tomcat? Why run a scheduler in an application server?
    any help is appreciated.
    I tried to execute the batch file from servlet it
    runs , but i see the cmd.exe in windows task manager
    and need a dos box open.
    Any ideas?If you need a DOS box open then you need a signed-on user. So here's my patch:
    1. Write an application that listens for messages from this Tomcat scheduler, and when it receives those messages it does something in a DOS box.
    2. Have somebody sign on to the server and run that application.
    3. Change the Tomcat scheduler to send messages to that application instead of trying to actually run it.
    It's up to you what kind of messages you should send. There are plenty of choices.

  • WHEN-WINDOW-ACTIVATED gives focus back to applet window

    Testcase:
    Form A calls form B
    Form B performs this code:
    BEGIN
    web.show_document(url);
    exit_form;
    END;
    This should open a new browser window to the URL and keep the focus on it.
    However, when form A has a WHEN-WINDOW-ACTIVATED trigger (even when the only code is NULL;), it return the focus to the forms applet browser window the first time.
    This is very annoying because the new browser window can no longer be seen as it is put on the background. Strangly enough, the following times the focus remains on the new browser window.
    Is this a known bug?
    PS: The problem is that i really need a WHEN-WINDOW-ACTIVATED trigger in my form A to perform some webutil-functions.
    Environment:
    Forms Developer 10g Release 2
    Application Server 10g Release 2
    Window 2000/Xp
    Oracle Jinitiator 1.3.1.22

    In which trigger are you calling Form B? As I said, the EXIT_FORM event would take you back to Form A after opening the browser window, so what happens next depends on what code it fires once returning to Form A.
    Have you tried it with debug messages on to see what triggers it is firing? (both first time round & subsequently). Logically, I would have actually expected focus to return to Form A following the EXIT_FORM, but maybe I'm wrong ni thinking that.
    Have you experimented with the various WEB.SHOW_DOCUMENT options (e.g. WEB.SHOW_DOCUMENT(url, '_self') to get a different behaviour?

  • When I close and reopen firefox, it restores my tabs, but it restores tabs from hours or days ago, not the ones that were open when I closed the window - why?

    I normally keep my Firefox window open for long periods of time because I have a lot of active tabs. When I close the window and reopen it, I am still able to restore tabs, but as of a few weeks ago, it has stopped restoring the most recent version. Normally, when I would close and reopen, the tabs would be the same ones that were open when I closed the window. Now, it restores to a version from a few days ago instead of the current version. I have to revert to pulling my more recent tabs out of the recent history. I checked my options and I can't figure out any way to control this. How can I fix it so that I can count on my Firefox window to restore the tabs that I actually care about?

    You can check for problems with the sessionstore.js and sessionstore.bak files in the Firefox Profile Folder that store session data.
    Delete the sessionstore.js file and possible sessionstore-##.js files with a number and sessionstore.bak in the Firefox Profile Folder.
    *Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    Deleting sessionstore.js will cause App Tabs and Tab Groups and open and closed (undo) tabs to get lost, so you will have to create them again (make a note or bookmark them).
    *http://kb.mozillazine.org/Multiple_profile_files_created
    *http://kb.mozillazine.org/Session_Restore

  • My 3 year-old macbook pro is very slow. I have run disk utility and virus scan with no improvement. The "beach ball" will spin for minutes at a time when opening, closing or changing windows. Apple Store looked at it a few months ago with no help.

    my 3 year-old macbook pro is very slow. I have run disk utility and virus scan with no improvement. The "beach ball" will spin for minutes at a time when opening, closing or changing windows. Apple Store looked at it a few months ago with no help. What can I do?

    Under CPU: 3.5% user; 5% system; 91% idle; 441 threads; 90 processes.
    Under System: out of 2GB - 54.7MB free; 530MB wired; 603MB active; 862MB inactive; 1.95GB used.
    Is too much of the system memory tied up? If so, what can I do to free some up?

  • When I open itunes I get a 'DATA EXECUTION PREVENTION' 'Windows closed program'. Can anybody help please.

    When open iTunes it starts OK then a message from Windows appears, 'DATA EXECUTION PREVENTION Windows closed program'. Then the whole thing shuts down. Does anybody know how to sort this out please. I am using XP operating system and have recently updated iTunes. Thanks

    Hi alanfromharlow,
    It sounds as if iTunes is failing to launch properly on your Windows computer. You don’t mention what version of Windows you have, but one of these two articles should be useful to you -
    iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues
    http://support.apple.com/kb/TS1717
    iTunes for Windows XP: Troubleshooting unexpected quits, freezes, or launch issues
    http://support.apple.com/kb/TS1421
    Thanks for using Apple Support Communities.
    Best,
    Brett L

  • Data changes saved when pop-up window closed instead of using Save button/action.

    We encountered an odd application behavior and we cannot tell if this is standard functionality or not.  When a spec is an a workflow step that is Signature Request, the Requestee can open a link to view the spec.  When the user also has edit permissions, they get the edit icon in the popup window.  We had a user that editted the spec then decided not to save the changes, so used the Close (red ex on popup) instead of the Action: Cancel button on the application menu. User expected that changes made would not be saved. It turns out that clicking the window closed save the modifications without any warning.  User expected Close to work like Cancel instead of Save.  Is this normal application behavior?
    Details.  Version 6.1.1.1 on IE9 with popup. 

    Did they make a change, close the popup, then workflow the Signature Request? Is so, then this is behavior we expect: When you are viewing a spec, you are viewing the in memory version of it, meaning that if you edit the spec, the changes are made to the in-memory version. If then clicked close, the in memory data is still loaded for that spec, and it may be that the signature request workflow event then saves the spec with those changes. The cancel button would have reverted the changes.
    You can, however, log an Enhancement Request for having the window close act like the Cancel.
    Thanks
    Ron

  • When downloading it says it will continue when windows messenger is closed.  It's not open? help!

    When I tried to download, it said it would continue when windows messenger
    is closed, but it is not open and I don't know what to do now.  Can anyone help?

    Hi, You still need to right click on the icon in your system tray and disable it anyway.
    Thanks,
    eidnolb

  • Is there a way to close VI's nicely when Window is closed with "X"?

    Is there a way to close VI's nicely when Window is closed with "X"?
    The VI is the GUI for an automated test console and I would like to save a state when it is closed to allow for the user to reopen the VI and the GUI is the same. At the very least I would like to make sure the equipment is placed into a safe state.
    -Nate

    Dennis, I could not find the VI you mentioned.  How do you search on a vi's name in Labview?  I even tried with Windows Explorer search and didn't find it.
    What I did find was that you need to use the "Panel Close?" filter event to catch clicking on the X, and the "Application Instance Close?" filter event to catch clicking on the menu bar File - Exit.  The attached vi does just this.
    - tbob
    Inventor of the WORM Global
    Attachments:
    CatchClose.vi ‏11 KB

  • How can I open the windows file directory in "WHEN-BUTTON-PRESSED" trigger

    Dear All,
    How can I open the windows file directory in “WHEN-BUTTON-PRESSED” trigger?

    Blessan Joseph,
    The solution is dependent on your Forms version and if your applications is traditional Client/Server (CS) (Forms 6i and lower) or web deployed (Forms 6i and higher). For CS, you would use the Get_File_Name() built-in as Faa demonstrated. For Web, you will need to use the WebUtil library function Client_Get_File_Name() as Sarah (OGIR) demonstrated. Both of these functions will return the full path to a file. Note: WebUtil is an external library so it requires you to perform some configuration on your developer client as well as on the Application Server. WebUtil is included with Forms 9i and higher, but you must download it for Forms 6i.
    My requirement is user should able to select windows directory for the output.Do you really need to allow the user to write to a file in the Windows directory? This is very dangerous and you should not allow users or programs to write to the Windows directory. Users should only be able to write files to "User" directories (\My Documents\<Directory name>).
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Close subvi window without "close afterwards when originally closed"

    Hi everybody,
    I've got a problem concerning Labview. In my program I need to update a graph in a seperate window. Therefore I made a subvi to display the data. The problem is now to close the window afterwards. The subvi is inside a while loop to get updated data all the time. I tried to use the "close afterwards when originally closed" but then the graph is closed after every loop. But it should be opened during the loops. I want to close the window manually by sending a false or anything else. Does anyone know an answer to my problem? Please help!!!
    Thx
    Thomas

    Hi,
    Please find attached example useful as a reference to your problem solving
    Cheers!
    Ian F
    Since LabVIEW 5.1... 7.1.1... 2009, 2010
    依恩与LabVIEW
    LVVILIB.blogspot.com
    Attachments:
    VS_Pass_Data.zip ‏62 KB

Maybe you are looking for