Performing some actions before window closing in browser

this can be done by <body onbeforeunload='delcookie()'>
delete cookie is a javascript function where i put inthe code to delete the cookie of my page when some one closes the page or some thing else load in that window.
this works even if window closes or some other page loads into the window. onunload can also be used it .it works in the second case only.

Hi Sunil,
You can retrieve the application properties in your code by:
IWDApplicationInfo application = wdComponentAPI.getApplication().getApplicationInfo();
String value = application.findInApplicationProperties("<property name>").getValue();
for eg: you can retrieve expiration time as:
application.findInApplicationProperties("sap.expirationTime").getValue();
But expiration time is the time after which the application expires and has nothing to do with the real time
About the application closing, as far as I know there is no event in webdynpro to capture the window closing event. So it depends on how the user closes the application. If he closes the application from within it using some button or link, then you can very well write the required code there. If he closes the browser directly, then I don't think you can handle that.
Hope this helps,
Best Regards,
Nibu.

Similar Messages

  • Auto Launch Application and perform some action

    Hello Friends,
    I am working on Autoback, want to launch application and perform some action to take backup.
    Can any one please update me what all the J2ME phone supports this kind of feature and basic needs to implement Autobackup, any sample code available please let me know
    Thanks,
    Kumar.M.R

    Something sketchy.
    I had the same message appear. It resized my window to the smallest possible size (not minimize!) and when I resized it larger, it had opened a new tab with that message. It was on "c510a1.minersaver1.com" which sounds like a related site. It tried to download "avmast_2004-4_mst5.exe"and I was going to try and refind this site on my Linux box, but forgot to save the exact URL (oops!).
    Running Firefox 4.0b11 on 64-bit Windows 7 Home Premium.
    EDIT: Found a LIVE link
    http://c510a1.minersaver1.com/defender/?44a=pccfjf&8d1ad=glslkkqpgl&eb45=gpqmpkkcmc&03f67=3

  • I need to check comparative three conditions and for each output I need to perform some action. can anybody please suggest

    I need to check three comparative conditions and for each status I need to perform some action. can anybody please suggest
    Requirment:
    Need to check if a numeric value is within a number range by using comparative function. Depending on status i need to ggive a constant input to numeric function.

    Easiest is suing an array of range boundaries, e.g. as follows:
    (Found here)
    Now it is fully scalable and  independent of the number of ranges. The solution in the earlier post would get complicated quickly whenever the number of ranges or boundary locations changes.
    LabVIEW Champion . Do more with less code and in less time .

  • Sessionrestore occasionally does not show my tabs as they were when I closed Firefox, but as they were some time before I closed it.

    Occasionally Sessionrestore doesn't show my tabs as they were when I closed Firefox, but as they were at some seemingly random (but persistent if trying again) point between starting and ending my previous session. Occasionally they're exactly as they were when I started my last session. I'm currently using Firefox 5, but the problem was already present when I was still using 4. Perhaps it's also relevant that I tend to have lots of windows and tabs open, sometimes to the point of crashing Firefox.

    I've increased my window limit to five too, though I'm unsure if I understand it's function correctly, I've reloaded more then three windows through session restore in the past. Anyway, that didn't have an effect. I haven't used app tabs at all yet, so I doubt that could be the problem. As for closing down Firefox correctly, the problem seems to persist regardless of how Firefox closes, be it a crash, killing it in task manager, or through file>exit. I forgot to mention this earlier, but I've monitored sessionstore.js, and it seems like that file literally stops being modified at some point, regardless if I keep browsing. If there's a way that I could "reliably duplicate" the process, I'd love to help, just say what I should do. It's been happening pretty much every browsing session lately, it seems that if I just browse for a decent while it's bound to happen.

  • Some secure sites recommend closing the browser. Is closing the tab the same as closing the browser?

    Secure sites recommend closing the browser. Is closing just the tab effectively the same?

    you can try disabling ipv6 support in firefox & see if that helps - [https://support.mozilla.org/en-US/kb/Server%20not%20found#w_ipv6]

  • OBIEE report with Click button ( want to perform some actions)

    Hi Experts,
    My users want to make adhoc changes to an OBIEE report where I want to place a click button at the bottom of the report. Once the changes are done, They want to click the button so that the most current logical sql is captured and then it takes to another http url .
    If any one have worked or has any ideas on this, Please share. Thanks in Advance.
    S

    Hi S,
    Can you elaborate on what you mean by capturing the most current logical SQL?
    What you are asking is only going to be as difficult as it is to perform the above action. The button and the navigate are simple.
    John Minkjan shows you how to make a clear button here.
    Basically you leverage the OBIEE class XUIPromptEntry minibuttonOn.
    Here's the code (NOTE: You have to change the curly brackets to angular brackets):
    {div class="XUIPromptEntry minibuttonOn"}{a href="#" onclick="return PersonalizationEditor.removeDefaultSelection(false)"}Clear{a}{div}
    You can take this and modify it slightly to fit your purpose:
    {div class="XUIPromptEntry minibuttonOn"}{a href="(URL to move to)" onclick="(javascript function that performs your task)"}Do Action Button{a}{div}
    In the above, you will put the URL you want to navigate to in the (URL to move to) area. Then in the onclick function, you're going to want to write a javascript function that captures the latest logical SQL and have OBIEE call that function.
    All that being said, this effort hinges on whether or not a javascript function can perform your task.
    If you can elaborate on what you mean, I might be able to get you started on that function.
    Good luck and if you found this post useful, please award points!
    Best regards,
    -Joe

  • Script for performing clean shutdown before windows shutdown

    Hi all,
    I need a script to perform a clean oracle shutdown every time that windows going to shutdown.I need this to be sure that there wont be any instance recovery every time I startup the oracle(Mostly I fear from header inconsistency and ...).
    Is there any thing that I can deploy for my development sites?
    -Your help will be so appreciated

    StartDB.bat
    =============
    net start OracleServiceORCL
    set oracle_sid=ORCL
    C:\oracle\ora92\bin\sqlplus -s /nolog @C:\startDB.sql
    net start OracleOraHome92TNSListener
    net start OracleOraHome92Agent
    pause
    startDB.sql
    ============
    connect / as sysdba
    startup pfile=initORCL.ora
    ==if you are using spfile, just say, startup
    exit
    StopDB.bat
    ===============
    set oracle_sid=ORCL
    C:\oracle\ora92\bin\sqlplus -s /nolog @C:\stopDB.sql
    net stop OracleOraHome92Agent
    net stop OracleServiceORCL
    pause
    connect / as sysDBA
    shutdown immediate
    exit
    Above scripts used for Oracle 9i or higher versions.
    Well, you can also do these with autostart parameter in the regedit.
    Jaffar

  • Loop through all open documents not performing some actions

    I have a loop that imports XML, then Exports each page individually, then has a SaveAs dialog for the indd, then closes the active document.
    The import XML works, the SaveAs works, and the close works but the loop skips over the PDF part. Is it because I need to define myCounter in the for loop within the ExportPDF function? I just included the part from Choose XML to the end of ExportPDF.
    //choose XML
    var FilterXML = "XML File: *.xml";
    var myXML = File.openDialog("Choose XML File", FilterXML);
    //loop for each action below
    for(myDocumentCounter = app.documents.length; myDocumentCounter > 0; myDocumentCounter--){
    //import XML
    app.activeDocument.importXML(myXML);
    //PDF by page to settings; preset must be "dailies_x1a"
    function myExportPages(myFolder){
    var myPageName, myFilePath, myFile;
    var myDocument = app.activeDocument;
    var myDocumentName = myDocument.name;
    var myBaseName = myBaseNameField.editContents;
    for(var myCounter = 0; myCounter < myDocument.pages.length; myCounter++){
    myPageName = myDocument.pages.item(myCounter).name;
    app.pdfExportPreferences.pageRange = myPageName;
    //The name of the exported files will be the base name + the page name + ".pdf".
    //If the page name contains a colon (as it will if the document contains sections), then remove the colon.
    var myRegExp = new RegExp(":","gi");
    myPageName = myPageName.replace(myRegExp, "_");
    myFilePath = myFolder + "/" + myBaseName + "_" + myPageName + ".pdf";
    myFile = new File(myFilePath);
    myDocument.exportFile(ExportFormat.pdfType, myFile, false, "dailies_x1a");

    Nevermind, I found my error. Code should read...
    for(myDocumentCounter = app.documents.length; myDocumentCounter > 0; myDocumentCounter--){
    if(app.documents.length != 0){
    var myFolder = Folder.selectDialog ("Choose a Folder to Save the PDFs");
    if(myFolder != null){
    myExportPages(myFolder);
    else{
    alert("Please open a document and try again.");
    function myExportPages(myFolder){
    var myPageName, myFilePath, myFile;
    var myDocument = app.activeDocument;
    var myDocumentName = myDocument.name;
    var myDialog = app.dialogs.add();
    with(myDialog.dialogColumns.add().dialogRows.add()){
    staticTexts.add({staticLabel:"Please Modify the Base Name if Necissary:"});
    var myBaseNameField = textEditboxes.add({editContents:myDocumentName,
    minWidth:160});
    var myResult = myDialog.show({name:"ExportPages"});
    if(myResult == true){
    var myBaseName = myBaseNameField.editContents;
    //Remove the dialog box from memory.
    myDialog.destroy();
    for(var myCounter = 0; myCounter < myDocument.pages.length;
    myCounter++){
    myPageName = myDocument.pages.item(myCounter).name;
    app.pdfExportPreferences.pageRange = myPageName;
    //The name of the exported files will be the base name + the
    //page name + ".pdf".
    //If the page name contains a colon (as it will if the
    //document contains sections),
    //then remove the colon.
    var myRegExp = new RegExp(":","gi");
    myPageName = myPageName.replace(myRegExp, "_");
    myFilePath = myFolder + "/" + myBaseName + "_" + myPageName + ".pdf";
    myFile = new File(myFilePath);
    myDocument.exportFile(ExportFormat.pdfType, myFile, false, "dailies_x1a");
    else{
    myDialog.destroy();

  • Loop the table entry and for every entry perform some action.

    Hello Experts,
    I have a requirement where there are let say n no. of entries in my ITAB and now for every entry i have to check certain field value and based on that i have to send respective mail.
    Now this has to run in background mode and the job will run on daily basis so the entries of table that are already processed should not be reprocessed.The scenario is every day the new entries will be added to ITAB and the newly added entries should be processed only.
    Please provide some sample code if possible.
    Thanks,
    Naveen

    Hi,
    I can not add a new field to the existing ztable. Crating a copy of ztable with addtional field status and setting it as processed against the record whenever i populate ITAB from ztable could be a solution but seems very lenthy method.
    There is one filed zdate  so write the code as below:-
    loop at itab where zdate = sy-datum
    email code------
    endloop.
    OR can i make use of
    loop at itab into wa
      ON change  of <filed1>
    email code-----
       ENDON
    endloop.
    Thanks,
    Naveen

  • How to perform some action every time when AppServer starts/stops

    I need to start/stop some external processes every time when AppServer starts/stops. Is there standart mechanism or API to do this?

    Most of the app servers support a concept of startup and shut down classes (I use this feature in Web logic 6.1)
    The startup classes are executed every time you start the app server and the shutdown classes are executed everytime the app server is brought down.
    Here is a URL that will give u all the details you need to know for weblogic startup classes
    http://e-docs.bea.com/wls/docs61///////ConsoleHelp/startupclass.html
    This is the URL for shut down classes for web logic
    http://e-docs.bea.com/wls/docs61//////ConsoleHelp/shutdownclass.html
    hope this helps.
    regards,
    Abhishek.

  • When Can I Expect Wondows 8.1? I would like to use the bait features of my Windows phone some day before Windows 9.0.

    @

    Drrhythm2 wrote:
    What's the best solution for this? I
    Copy the entire /Music/iTunes/ folder from her old compouter to /Music/ in her account on this new computer.

  • How do I perform an action just before someone saves a data block?

    Hi,
    I need a trigger to attach to a datablock to perform some processing before the record is saved. I can't find anything suitable - I can see WHEN-VALIDATE-RECORD but this can run without you saving can't it? The code must only be executed when the user saves.
    Can anyone help?
    (Forms 6i)
    Thanks Adam

    Whatever you do, DO NOT use a KEY-COMMIT trigger !
    There are many ways a commit can be performed without firing that trigger.
    There is also POST-FORMS-COMMIT, which despite its name, fires before commit, ie if form_trigger failure is raised in it, then the commit does not happen.

  • Cannot save opened tabs before closing the browser

    Cannot save opened tabs before closing the browser. I do not know if there is such a feature (should be), and how to activate it.
    It was very useful with previous version.

    One change in Firefox 4 is to by default stop Firefox displaying the warning message, but it can be turned back on by changing some preferences.
    # Type '''about:config''' into the location bar and press enter
    # Accept the warning message that appears, you will be taken to a list of preferences
    # Locate the preference '''browser.tabs.warnOnClose''', if its value is set to '''false''', double-click on it to change its value to '''true'''
    # Repeat this for these 3 preferences '''browser.warnOnQuit''', '''browser.warnOnRestart''' and '''browser.showQuitWarning'''
    If you always open the last set of tabs an alternative approach is this:
    # Click the orange Firefox button, then select options to open the options window
    # Go to the General panel
    # Change the setting "When Firefox starts" to "Show my windows and tabs from last time"

  • Dynpro application: how to perform some  code when user click window close

    Hello,
    I'm developing dynpro application. This application needs to perform some code when exiting.
    I can do that with MODULE xxxxx AT EXIT-COMMAND. But this code can't be performed when user of application click on button closing window (classic R/3 window, not pop-up).
    Does anybody know how to bind some code to clicking on button closing window?
    Best regards,
    Josef Motl

    As far as the prompt that you get when you close the last window is coming from the counter that SAP maintains regarding the number of open sessions(windows). When this counter reaches 1, I guess they have a check to issue a prompt. There was a discussion in this forum a long time back regarding how we can know that session id like SM04. There was no conclusion reached then. Theoritically, let us know you know this id for the session in which the user opened a particular page, then you can see if that session is deleted and then take the necessary action. There are some TH_* function modules that seem to be promising, but I was not able to conclusively achieve the control over a particular session.
    See if you can look at SM04 and get an idea. Please do let us know if you find the solution.
    Srinivas

  • Problem description: My  macbook pro since this afteon has been slower, every application I open, it takes a long time to open, and shows the spinning beach ball for a while before it opens or performs some task, or responds to a click-  EtreCheck

    My computer
    Problem description:
    My  macbook pro since this afternoon has been slower, every application I open, it takes a long time to open, and shows the spinning beach ball for a while before it opens or performs some task, or responds to a click…
    EtreCheck version: 2.1.8 (121)
    Report generated 31 de março de 2015 18:29:15 BRT
    Download EtreCheck from http://etresoft.com/etrecheck
    Click the [Click for support] links for help with non-Apple products.
    Click the [Click for details] links for more information about that line.
    Hardware Information: ℹ️
        MacBook Pro (13-inch, Early 2011) (Technical Specifications)
        MacBook Pro - model: MacBookPro8,1
        1 2.3 GHz Intel Core i5 CPU: 2-core
        16 GB RAM Upgradeable
            BANK 0/DIMM0
                8 GB DDR3 1333 MHz ok
            BANK 1/DIMM0
                8 GB DDR3 1333 MHz ok
        Bluetooth: Old - Handoff/Airdrop2 not supported
        Wireless:  en1: 802.11 a/b/g/n
        Battery Health: Normal - Cycle count 250
    Video Information: ℹ️
        Intel HD Graphics 3000 - VRAM: 512 MB
            Color LCD 1280 x 800
    System Software: ℹ️
        OS X 10.10.2 (14C1514) - Time since boot: 0:25:47
    Disk Information: ℹ️
        Hitachi HTS545032B9A302 disk0 : (320,07 GB)
            EFI (disk0s1) <not mounted> : 210 MB
            Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
            Macintosh HD (disk1) / : 318.84 GB (47.94 GB free) - 51 errors
                Core Storage: disk0s2 319.21 GB Online
        MATSHITADVD-R   UJ-898 
    USB Information: ℹ️
        Apple Inc. Apple Internal Keyboard / Trackpad
        Apple Inc. BRCM2070 Hub
            Apple Inc. Bluetooth USB Host Controller
        Apple Inc. FaceTime HD Camera (Built-in)
        Apple Computer, Inc. IR Receiver
    Thunderbolt Information: ℹ️
        Apple Inc. thunderbolt_bus
    Gatekeeper: ℹ️
        Mac App Store and identified developers
    Launch Agents: ℹ️
        [not loaded]    com.adobe.AAM.Updater-1.0.plist [Click for support]
        [loaded]    com.oracle.java.Java-Updater.plist [Click for support]
        [running]    com.trusteer.rapport.rapportd.plist [Click for support]
    Launch Daemons: ℹ️
        [loaded]    com.adobe.fpsaud.plist [Click for support]
        [loaded]    com.adobe.SwitchBoard.plist [Click for support]
        [loaded]    com.microsoft.office.licensing.helper.plist [Click for support]
        [loaded]    com.oracle.java.Helper-Tool.plist [Click for support]
        [loaded]    com.oracle.java.JavaUpdateHelper.plist [Click for support]
        [running]    com.trusteer.rooks.rooksd.plist [Click for support]
    User Launch Agents: ℹ️
        [loaded]    com.adobe.AAM.Updater-1.0.plist [Click for support]
        [loaded]    com.adobe.ARM.[...].plist [Click for support]
        [loaded]    com.google.keystone.agent.plist [Click for support]
        [running]    com.spotify.webhelper.plist [Click for support]
    User Login Items: ℹ️
        iTunesHelper    UNKNOWN Hidden (missing value)
        AdobeResourceSynchronizer    Application Hidden (/Applications/Adobe Reader.app/Contents/Support/AdobeResourceSynchronizer.app)
        Stickies    Application  (/Applications/Stickies.app)
    Internet Plug-ins: ℹ️
        JavaAppletPlugin: Version: Java 8 Update 31 Check version
        FlashPlayer-10.6: Version: 17.0.0.134 - SDK 10.6 [Click for support]
        Default Browser: Version: 600 - SDK 10.10
        AdobePDFViewerNPAPI: Version: 10.1.13 [Click for support]
        AdobePDFViewer: Version: 10.1.13 [Click for support]
        Flash Player: Version: 17.0.0.134 - SDK 10.6 [Click for support]
        QuickTime Plugin: Version: 7.7.3
        SharePointBrowserPlugin: Version: 14.4.8 - SDK 10.6 [Click for support]
        Google Earth Web Plug-in: Version: 7.1 [Click for support]
        Silverlight: Version: 5.1.30514.0 - SDK 10.6 [Click for support]
        iPhotoPhotocast: Version: 7.0 - SDK 10.8
    User internet Plug-ins: ℹ️
        npsf_cef: Version: sf 3.3.1.1 [Click for support]
        Google Earth Web Plug-in: Version: Unknown
    Safari Extensions: ℹ️
        DivX HiQ
        DivX Plus Web Player HTML5 <video>
    3rd Party Preference Panes: ℹ️
        Flash Player  [Click for support]
        Java  [Click for support]
        MacFUSE  [Click for support]
        Perian  [Click for support]
        Trusteer Endpoint Protection  [Click for support]
    Time Machine: ℹ️
        Skip System Files: NO
        Auto backup: YES
        Volumes being backed up:
            Macintosh HD: Disk size: 318.84 GB Disk used: 270.90 GB
        Destinations:
            Time Machine Backups [Local]
            Total size: 999.86 GB
            Total number of backups: 60
            Oldest backup: 2012-07-15 01:16:54 +0000
            Last backup: 2015-03-29 19:28:06 +0000
            Size of backup disk: Excellent
                Backup size 999.86 GB > (Disk size 318.84 GB X 3)
    Top Processes by CPU: ℹ️
            97%    rapportd
             3%    WindowServer
             1%    mds
             0%    fseventsd
             0%    distnoted
    Top Processes by Memory: ℹ️
        155 MB    Safari
        120 MB    Finder
        86 MB    rapportd
        86 MB    WindowServer
        69 MB    mds_stores
    Virtual Memory Information: ℹ️
        12.56 GB    Free RAM
        2.53 GB    Active RAM
        428 MB    Inactive RAM
        1.66 GB    Wired RAM
        1.04 GB    Page-ins
        0 B    Page-outs
    Diagnostics Information: ℹ️
        Mar 31, 2015, 06:00:15 PM    Self test - passed
        Mar 31, 2015, 01:13:05 PM    /Users/[redacted]/Library/Logs/DiagnosticReports/Microsoft Error Reporting_2015-03-31-131305_[redacted].crash
        Mar 31, 2015, 01:05:42 PM    /Users/[redacted]/Library/Logs/DiagnosticReports/Microsoft Error Reporting_2015-03-31-130542_[redacted].crash
        Mar 31, 2015, 12:24:33 PM    /Users/[redacted]/Library/Logs/DiagnosticReports/Microsoft Error Reporting_2015-03-31-122433_[redacted].crash
        Mar 30, 2015, 05:45:38 PM    /Library/Logs/DiagnosticReports/Skype_2015-03-30-174538_[redacted].cpu_resource .diag [Click for details]
        Mar 30, 2015, 01:52:07 PM    /Users/[redacted]/Library/Logs/DiagnosticReports/Last.fm Scrobbler_2015-03-30-135207_[redacted].crash
        Mar 29, 2015, 05:55:05 PM    /Users/[redacted]/Library/Logs/DiagnosticReports/com.apple.WebKit.WebContent_20 15-03-29-175505_[redacted].crash
        Mar 29, 2015, 01:06:38 PM    /Library/Logs/DiagnosticReports/VLC_2015-03-29-130638_[redacted].hang
        Mar 29, 2015, 01:02:47 PM    /Library/Logs/DiagnosticReports/VLC_2015-03-29-130247_[redacted].hang

    Open Activity Monitor and kill this process - rapportd.
    Reinstalling OS X Without Erasing the Drive
    Boot to the Recovery HD: Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Reinstalling OS X Without Erasing the Drive
    Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the main menu. Repair the Hard Drive and Permissions as follows.
    When the recovery menu appears select Disk Utility and press the Continue button. After Disk Utility loads select the Macintosh HD entry from the the left side list.  Click on the First Aid tab, then click on the Repair Disk button. If Disk Utility reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit Disk Utility and return to the main menu.
    Reinstall OS X: Select Reinstall OS X and click on the Continue button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.
    Alternatively, see:
    Reinstall OS X Without Erasing the Drive
    Choose the version you have installed now:
    OS X Yosemite- Reinstall OS X
    OS X Mavericks- Reinstall OS X
    OS X Mountain Lion- Reinstall OS X
    OS X Lion- Reinstall Mac OS X
         Note: You will need an active Internet connection. I suggest using Ethernet
                     if possible because it is three times faster than wireless.

Maybe you are looking for