Show Confirmaiton Dialog when user closes the browser

Hello All,
Can we show a confirmation dialog when user chooses to close the browser in which applet is running? I know that it can be done using javascript. Can it be done using java code?
Please suggest.
Thank you.

teejrama wrote:
..Can we show a confirmation dialog when user chooses to close the browser in which applet is running?.. You can pop a JOptionPane in the applet's destroy() method, but that will not do any good, since the browser is not asking the applet for advice on whether it is closing, it is telling the applet it is closing.
..I know that it can be done using javascript... Can it? How?
If so, that would be another good reason to disable JS.
..Please suggest.I suggest you presume the end-user is smart enough to know when they want to close their own browser, and not interfere in that process.
Thank you.No worries.

Similar Messages

  • Record locks created when user closes the Browser and not the Web Form

    Hi. We sometimes encounter the issue where a user updates a record, locking the record on the table, but then they unexpectedly closes the browser without saving by clicking the X in the upper-right of the browser window. Then when another user comes along and attempts to edit that record they get the message Unable to Reserve Record. The orphaned record lock eventually does seem to clear itself out, but that can often take 15-20 minutes.
    Is there any way to speed this up? Or to pragmatically keep this from occurring? Either on the database side or with some code in a particular application?
    Please let me know your thoughts. Thanks in advance.

    If a user closes the browser window the forms runtime on the application server holding the locks is in most cases still up and running. The FORMS_TIMEOUT controls on how long a forms runtime on the server is up and running without the client applet not sending a heartbeat (See MOS note 549735.1). By default this is 15 minutes which would explain your locks being held 15 minutes.
    You could decrease the FORMS_TIMEOUT in the default.env, so the forms runtimes get cleaned earlier and thus the locks get released earlier.
    Note that if you have blocking client_hostcalls with webutil this might be a problem, as it prevents the forms applet from sending the heartbeat and after the FORMS_TIMEOUT passed while the forms applet is blocked the forms runtime on the server gets closed.
    cheers

  • How the system automatically kills the process when I close the browser?

    Hi everybody,
    I have the following problem: I run a report on the web browser. Suppose the user want to detail on one of the characteristics of report. If this takes long time (there are many records in report) and the user closes the web browser, the SAP system still run the proccess (in SM50 I see the dialog process still working, althrough the user closes the browser). This didn't happen in Excel, means, if the user press the 'Cancel' button when he/she tried to detail on one characteristic, the corresponding process is killed too (I see in SM50 how the corresponding dialog process is removed).
    How can I solve this ? Any idea about this?
    Thanks in advance.
    Florina

    Florina,
    there is a timeout set for the web session and the session would get automatically terminated after some time ..
    Some options are :
    1. Use Stateless Templates
    2. There is a Web Template setting called "Automatic Session Management" which uses a page wrapper cookie and kills the session when the person navigates from the page.. - <b>have changed it from previous answer after seeing Anil's post - apologies</b>
    3. If you are using EP  , you could implement DSM Terminator for the same.
    All the above( except 3) will not be suitable for stateful templates , if you want export to excel capability , or printing capability or the capability to save the pages as HTML for local use , you have to use stateful templates.
    First you would have to decide whether to use statefull or stateless templates and then depending on the choice made , go for any of the above. In case non of them work out for you , there is another option , but that would include a lot of javascript and using some command line parameters , update this post and I can tel you about the other if required..
    Hope it helps..
    Arun
    Assign points if useful
    Message was edited by: Arun Varadarajan

  • I would like to save only selective web sites in my cache, and everything else gets deleted when I close the browser

    Lets say I have a website called xyz, I would like to keep the cache from this site and have everything else deleted when I close the browser.

    The involved CSS code can be found in this file that you can open via the location bar.
    * chrome://global/skin/autocomplete.css
    Look for class .ac-emphasize-text and apply modified rules as you like.
    You need to add the !important flag to override rules.
    Add code to the <b>userChrome.css</b> file below the default @namespace line.
    *http://kb.mozillazine.org/userChrome.css
    <pre><nowiki>@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    @namespace html url("http://www.w3.org/1999/xhtml");
    html|span.ac-emphasize-text {
    box-shadow: none!important;
    background-color: transparent !important;
    border-radius: 0px;
    text-shadow: none !important;
    </nowiki></pre>
    The customization files userChrome.css (user interface) and userContent.css (websites) are located in the <b>chrome</b> folder in the Firefox profile folder.
    *http://kb.mozillazine.org/Editing_configuration
    You can use this button to go to the currently used Firefox profile folder:
    *Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)
    * Create the chrome folder (lowercase) in the <xxxxxxxx>.default profile folder if this folder doesn't exist
    * Use a plain text editor like Notepad to create a (new) userChrome.css file in this folder (the names are case sensitive)
    * Paste the code in the userChrome.css file in the editor window and make sure that the userChrome.css file starts with the default @namespace line
    * Make sure that you select "All files" and not "Text files" when you save the file via "Save file as" in the text editor as userChrome.css. Otherwise Windows may add a hidden .txt file extension and you end up with a not working userChrome.css.txt file

  • The new version of firefox does not shut down when I close the browser it continues running in the background. In addition it opens Adobe Reader for a brief time and then that closes. Everything worked fine before this new version.

    Firefox automatically loaded a new version recently. The new version does not shut down when I close the browser it continues running in the background. In addition it opens Adobe Reader for a brief time and then that closes. Everything worked fine before this new version.

    See "Hang at exit":
    * http://kb.mozillazine.org/Firefox_hangs
    * https://support.mozilla.com/kb/Firefox+hangs

  • Cookies are not being cleared when I close the browser although the option is set. Any suggestions?

    Under Options; Privacy I have Clear history when Firefox closes ticked and within the Settings for Clearing History I have Cookies ticked. Cookies are not being cleared when I close the browser. Windows 7, SP1 x64

    If clearing the cookies doesn't help then it is possible that the file <i>cookies.sqlite</i> that stores the cookies is corrupted.
    Rename (or delete) <b>cookies.sqlite</b> (cookies.sqlite.old) and delete <b>cookies.sqlite-journal</b> and <b>cookies.txt</b>, if they exist, in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder] in case the file cookies.sqlite got corrupted.
    * http://kb.mozillazine.org/Cookies#Removing_cookies

  • When I customize things like homepage, privacy, history they all change back to Firefox default when I close the browser

    Firefox will not remember my customized options. I set my homepage and privacy options and when I close the browser and reopen, it will be back to Firefox default homepage.

    Sounds like you could have a locked or corrupt preferences file. Try this article for steps to fix that - [[Preferences are not saved]].

  • When i close the browser it ask whether you want quit or save and quit , when i selet save and quit none of te pages are saved, or if saved where can i find them?

    when i close the browser it ask whether you want quit or save and quit , when i selet save and quit none of te pages are saved, or if saved where can i find them?

    Make sure that you do not use [[Clear Recent History]] to clear the 'Browsing History' when you close Firefox.
    * [[Firefox does not ask to save tabs and windows on exit]]

  • The App tabs that I set get erased when I close the browser. How do I get them to stay?

    I have set app tabs during a browsing session. The tabs stay in place as I go from site to site. When I close the browser and then re-open it the app tabs are erased and I have to start over again. I have been working around the problem by bookmarking the sites I use often, but that is an inconvenience. Would appreciate any suggestions.

    App tabs and Tab Groups (Panorama) are stored as part of the session data in the file sessionstore.js in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder]
    * http://kb.mozillazine.org/Session_Restore
    Make sure that you do not use [[Clear Recent History]] to clear the "Browsing History" if Firefox is closed.

  • How can I keep a cookie for a certain site when I have set Firefox to delete cookies when I close the browser?

    I have set Firefox to delete all cookies when I close the browser. Some websites identify my computer with a cookie, so when I try to log in to these sites, they don't recognize my computer because the identifying cookie has been deleted. I understand that Internet Explorer has a feature that preserves specified cookies, but haven't been able to find that capability in Firefox. Is there a way to do it?

    Let all cookies expire when you close Firefox.
    * Tools > Options > Privacy > Cookies: "Keep until": "I close Firefox"
    Make an Allow exception for the ones that you want to keep.
    * Tools > Options > Privacy > Cookies: "Exceptions"
    You can inspect and modify the permissions for the domain in the current tab in "Tools > Page Info > Permissions"
    Make sure that you do not use "Clear Recent History" to clear the "Cookies" and the "Site Preferences" (Site Preferences includes the cookie exceptions)
    * https://support.mozilla.com/kb/Clear+Recent+History
    Clearing cookies will remove all specified (selected) cookies including cookies that have an allow exception.
    See also:
    * https://support.mozilla.com/kb/Cookies
    * https://support.mozilla.com/kb/Enabling+and+disabling+cookies

  • Why does the Welcome to firefox tab open with my google tab every time I open the browser? And why can't the browser hold any add-ons I downloaded? I loose then when I close the browser, even tool bars have to be reinstalled every time I open the browser

    Every time I open the browser the Welcome to Firefox tab is the first tab, then a second tab opens and thats my google, then a 3rd tab opens for me to reinstall my toolbar. This has been happening for a good year. Updates have not fixed it. Others have this problem. I did a search for an answer, the question is out there but no answer. Now if I go into add ons and add a background Theme or an extension it all is gone when I exit the browser. When I open the browser again I get all 3 tabs and have to install my toolbar again. I DO NOT want to reinstall as I will loose all my saved data, passwords, bookmarks, everything! I have had this computer for a year, Windows Vista x64 bit. Its not the computer, it's the browser. If you have specific questions e-mail me and I will be more then happy to help

    See this article for some suggestions: [[Firefox has just updated tab shows each time you start Firefox]]
    See also http://kb.mozillazine.org/Preferences_not_saved and Preferences are not saved

  • How can I get my desktop page to open when I close the browser and then re open it?

    when I click the red x to close the browser, when I come back to open the browser later, the last page I was viewing. last session opens, even all other tabs behind it, instead of my google page (my home page)? can this be fixed) I know I can just click the google word in the search bar, but should not have to do this!

    {
    "application": {
    "name": "Firefox",
    "version": "32.0.3",
    "userAgent": "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0",
    "supportURL": "https://support.mozilla.org/1/firefox/32.0.3/WINNT/en-US/"
    "crashes": {
    "submitted": [],
    "pending": 9
    "modifiedPreferences": {
    "browser.cache.disk.capacity": 358400,
    "browser.cache.disk.smart_size.first_run": false,
    "browser.cache.frecency_experiment": 3,
    "browser.places.smartBookmarksVersion": 7,
    "browser.sessionstore.upgradeBackup.latestBuildID": "20140923175406",
    "browser.startup.homepage_override.mstone": "32.0.3",
    "browser.startup.homepage_override.buildID": "20140923175406",
    "dom.mozApps.used": true,
    "extensions.lastAppVersion": "32.0.3",
    "gfx.direct3d.last_used_feature_level_idx": 0,
    "network.cookie.prefsMigrated": true,
    "places.history.expiration.transient_current_max_pages": 104858,
    "places.database.lastMaintenance": 1413230897,
    "plugin.disable_full_page_plugin_for_types": "application/pdf",
    "privacy.sanitize.migrateFx3Prefs": true,
    "storage.vacuum.last.places.sqlite": 1413230897,
    "storage.vacuum.last.index": 0
    "graphics": {
    "numTotalWindows": 1,
    "numAcceleratedWindows": 1,
    "windowLayerManagerType": "Direct3D 10",
    "windowLayerManagerRemote": false,
    "adapterDescription": "AMD Radeon HD 7670M",
    "adapterVendorID": "0x1002",
    "adapterDeviceID": "0x6840",
    "adapterRAM": "1024",
    "adapterDrivers": "aticfx64 aticfx64 aticfx64 aticfx32 aticfx32 aticfx32 atiumd64 atidxx64 atidxx64 atiumdag atidxx32 atidxx32 atiumdva atiumd6a atitmm64",
    "driverVersion": "13.151.0.0",
    "driverDate": "8-19-2013",
    "adapterDescription2": "",
    "adapterVendorID2": "",
    "adapterDeviceID2": "",
    "adapterRAM2": "",
    "adapterDrivers2": "",
    "driverVersion2": "",
    "driverDate2": "",
    "isGPU2Active": false,
    "direct2DEnabled": true,
    "directWriteEnabled": true,
    "directWriteVersion": "6.3.9600.17111",
    "webglRenderer": "Google Inc. -- ANGLE (AMD Radeon HD 7670M Direct3D9Ex vs_3_0 ps_3_0)",
    "info": {
    "AzureCanvasBackend": "direct2d",
    "AzureSkiaAccelerated": 0,
    "AzureFallbackCanvasBackend": "cairo",
    "AzureContentBackend": "direct2d"
    "javaScript": {
    "incrementalGCEnabled": true
    "accessibility": {
    "isActive": true,
    "forceDisabled": 0
    "libraryVersions": {
    "NSPR": {
    "minVersion": "4.10.6",
    "version": "4.10.6"
    "NSS": {
    "minVersion": "3.16.5 Basic ECC",
    "version": "3.16.5 Basic ECC"
    "NSSUTIL": {
    "minVersion": "3.16.5",
    "version": "3.16.5"
    "NSSSSL": {
    "minVersion": "3.16.5 Basic ECC",
    "version": "3.16.5 Basic ECC"
    "NSSSMIME": {
    "minVersion": "3.16.5 Basic ECC",
    "version": "3.16.5 Basic ECC"
    "userJS": {
    "exists": false
    "extensions": [
    "name": "Logitech SetPoint",
    "version": "6.5",
    "isActive": false,
    "id": "{F003DA68-8256-4b37-A6C4-350FA04494DF}"
    "name": "Norton Toolbar",
    "version": "2014.7.8.23",
    "isActive": false,
    "id": "{2D3F3651-74B9-4795-BDEC-6DA2F431CB62}"
    "name": "Skype Click to Call",
    "version": "7.3.16540.9015",
    "isActive": false,
    "id": "{82AF8DCA-6DE9-405D-BD5E-43525BDAD38A}"
    "experiments": []
    }

  • When I close the browser and then re open it it does not go to the home page but opens to the last page that was open when I close it.

    Every time We have been closing the browser for the last few days when we restart the browser, regardless of weather we shut down the computer or not, it reopens to the last page that was opened. I cleared out and deleted the history but it did not help.

    Maybe you currently have your home page setting to "Show my windows and tabs from last time" instead of "Show my home page".
    *Firefox button > Options > Options > General tab > Startup > "When Firefox starts"
    *If using the Menu Bar: Tools > Options > General tab > Startup > "When Firefox starts"
    *See --> [http://support.mozilla.com/en-US/kb/How+to+set+the+home+page How to set the home page]
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You need to update some plug-ins:
    *Plug-in check: https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.com/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.com/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.com/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.com/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • When I close the browser, firefox won't open again. I get the message "Firefox is still running, restart your computer." How do I fix this?

    When I close the Firefox browser by clicking on the X in the upper right-hand corner of the screen, the window closes. But when I want to open Firefox again, I cannot. Instead, I get a message, "Firefox is still running. Restart your computer." This happens a few times a week and is very disconcerting. How do I fix this problem?

    I will only close the browser by using your suggestion, File > Exit, from today on, and see what happens. Thank you for your expedient reply.

  • How do I customize the "Navigation Tool Bar" by adding the print ICON so that the ICON will remain when I close the browser?

    I have tried SEVERAL times to customize the "Navigation Tool Bar" by adding the print ICON. Every time I do this it works until I close the browser then I have to re-add the ICON the next time I open the browser. How do I make the ICON stay from session to session?

    See [[toolbar keeps resetting]].

Maybe you are looking for

  • White Keyboard issues

    Hi I have had problems with Apple's white keyboard. I believe it's still the latest one. Every 3-4 months of normal usage of my keyboard, the keys start sticking and I find it very hard to type. I have brought the keyboard back, and now this is my FO

  • Why does my photo booth say no camera connected?

    I was trying to take pictures on photo booth and it says "no connection to camera", how do I fix that?

  • How can I remove these files? - Nokia 5310

    So, I bought a Nokia 5310, configured it, yada yada, everything's working fine. My memory card, oddly enough, came with an extra folder ironically titled "Extra" This folder has 5 songs in it, all of which I am not interested in and want OFF my phone

  • Have I received poor advice about osx lion upgrade?

    I have a 2011 13" MBP, Intel Core i5, 4GB ram model (Purchased new from an Apple store in April 2011). I have asked an Apple store assistant if I will be able to upgrade to the forthcoming Lion osx but was told the 13" MBP with i5 processor would pro

  • Trouble Inserting Titles & Still Images

    I've ground through FAQ, etc. and maybe I'm not searching for the right terms - so any help is appreciated. Here's my situation: * I've been working with a PP (CC) project cutting a long video into pieces, re-ordering, etc.  All was well; * I started