Exit of page

Hi,
I would like to initiate a process on the exit of a page (moving to another page).
is it possible? and if so, how?

Hi Ben,
I wouldn't go as far as to say that I'd "recommend" the use of handling the unload event!
I have only implemented this solution twice - once to ensure that popup windows are closed and once to invalidate a user's session in a portal if they don't use the proper "logout" functionality.
If you have a look at the following thread:
Re: Delete from table when closing window
you'll see that I've been trying to pursuade the OP, perhaps in vain, to implement other methods to handle data cleanup.
Given that the onunload event is not triggered in some situations (eg, the client's machine locking, crashing, suffering power failures or, even, the dreaded blue-screen-of-death) I would certainly NOT recommend it for data manipulation.
Yes, onunload can be used but it must not be relied upon.
Regards
Andy

Similar Messages

  • In IOS 8, there is no X to exit amweb page! It stays there forever, even when you go to another page!

    HOw do I exit web pages in Safari in IOS8? There's no x anymore!

    Open the iGoogle page but press the escape key to stop the page loading. If you have the "My Scores" gadget delete it.

  • Need help with an "exit door" page

    My office has a page on our webserver that serves as an "exit door". It basically tells you when you're leaving our site (they do this because it's a gov't site, and thus rquired) and you have to click on a link to confirm that you want to leave.
    The way it works is that when you code a page with a link that needs an exit door, you prepend the url with "exit.cfm?link=" and then the URL. It works adequately on simple URLS that pass no parameters. Where it has a problem is when a URL has GET arguments like ?page=23&item=43.
    The original coder used URL.link, which of course only captures the first GET argument. As a work-around, we're required to edit the target URLS being passed to the exit door and replace things like & and # with [amp], [pound], etc. Needless to say, this gets rather tedious, so I decided to have a look at that old exit door page to see what I could do with it.
    After playing around a bit, I achieved  a reasonable level of success by using the following:
    #xmlformat(ListDeleteAt(CGI.QUERY_STRING,1,"="))#
    This gives me a properly encoded full URL to use as a link on the exit door page. But there's one problem. If there's a link that contains an anchor (like foo.com#section1) it doesn't capture the anchor. The # and what's after it isn't being passed.
    I'm trying to figure out how to make this work.  Has anyone else here had to make an exit door, and if so, how did you do yours?

    Thanks mack.  I'm starting to think the answer to this is "it can't be done".  Which is probably why my predecessor was replacing &s with [amp]s.
    What led me to try to change this was that I was trying to build a regex for Dreamweaver that changed things like & and # to [amp] and [pound], but only when the URL began with the exit door page URL.  I was only able to get my regex to replace one occurance of an item per pass, which sort of defeated its purpose.  So I decided to change the exit door page instead.
    Maybe I'll go back to trying to get the regex to work.
    Ian, thanks for your help as well.

  • Exiting a page flow

    Hi guys, and thanks a lot for answering my previous questions.
    Now i am wondering; is there a way to explicitly exit a page flow?
    Regards,
    Håvard Nesvold

    Sathish-
    Through the use of custom and standard controls, I have incorporated authentication
    and user management in my jsps. There is a netui tag that you can utilize to
    reference a control. I have found the easiest way to add a control is to drag
    it from my tree onto the JSP.
    As for getting pageFlow into my header, I haven't tried yet.
    Eric
    "Sathish Venkatesan" <[email protected]> wrote:
    >
    Eric,
    I have checked with support. This functionality is not supported in the
    current
    release.
    I want to try a different approach.
    I want to use a custom java control in jsp ?
    Did you had a chance to try it out and had any luck ?
    thanks,
    sathish
    "Eric Ballou" <[email protected]> wrote:
    Sathish-
    Have you tried a global pageflow? Also, did you include the netui tags
    in the
    pageflow? I personally have thought about doing the same, but I was
    concerned
    about using the jsp:include as some session information doesn't always
    transfer
    or call properly in an include. One idea may be to use a reference/render
    to
    a portlet. Those are just approach ideas I haven't tried, but may soon.
    Hope
    that at least gives you a starting point.
    Eric
    "Sathish Venkatesan" <[email protected]> wrote:
    Hi all,
    I want to include a page flow in header section of a portal.
    I tried with JSP:include tag , but I'm getting message unable to find
    action .
    Is it possible ?
    thanks,
    sathish

  • Seting action on exit of page

    Is there any way to set an action on exit of the page?
    I mean, in one window i'm uploading files to temp directory and if user presses 'correct' button it targets custom tag which deletes these files.
    My concern is that if user will leave page without either pressing that 'correct' button or 'upload' button (Both deletes files) these files will be left in the server.
    So is there any way to target my custom tag on exit of the page?
    cheers,
    Simon

    This sounds like something you'll want JavaScript for. Check out the window.onload() method. It fires whenever a user tries to 'leave' your page (i.e., when a 'page' is unloaded from the browser).
    Sample:
    <html>
         <head>
              <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
              <title>Unloading a Page</title>
              <script type="text/javascript">
                   function unloaded(){
                        alert( 'you are leaving my page...' );
              </script>
         </head>
         <body onunload="unloaded()">
              <p>Hello World</p>
         </body>
    </html>
    This is only meant as a skeleton to get you started!
    Hope it helps,
    Craig

  • EXIT BUTTON - PAGE NOT FOUND issue for Address

    After customization of home page, we are getting page not found error for the Exit button in Address and in some other applications, it is opening a new window and in some other applications, the screen is getting struck and the backend user id is getting locked.
    Could some one suggest me ? I feel we make the exit button invisible so that end user will not click on that totally. Is this a good idea?

    You can of course hide the exit buttin via personalisation
    read the sap note 951257 for the issue you are having
    The solution is to go and make the necessary  entries.
           -   Go to  V_T7XSSSERARBC view.
           -   Select the Area for which the exit button is not working.
           -   Enter 'Area Link Type' if not entered already.
           -   Enter 'Link Resource' if not entered already.
           -   Save the changes made.
    With regard to the WorkProtect Mode, Ifollow the note #734861 -
    "WorkProtect Mode - Global Settings".
    also check the steps here
    While creating an iView instance there are two option
    -paste
    -paste as delta link
    You should choose paste as delta link option.
    Please check the link for more information-
    http://help.sap.com/saphelp_NW04s/helpdata/en/f5/eb515d0e6a11d7b84900047
    582c9f7/frameset.htm
    We checked the attachments, it seems that when you run the application
    from preview mode you will not see 'exit' button. If you run the
    application directly you will not see 'exit'button.
    'Exit' button feature comes into picture when you consider that
    application should use home page customizing feature.

  • How to create validations on exit a page item?

    Hi all,
    I need to validate a field on exit it and not when click a button. Is it possible in apex? 
    Thanks
    bsalvador

    bsalvador
    You didn't state the apex version you are using but assuming your at least on version 4 all client side interaction start with Dynamic actions.
    These are explained in chapter 17.9 of the Application Express Application Builder User's Guide Release 4.2.
    See if using the when condition works for the validations. With an alert as action to notice the user of the error.
    The standard when conditions would probably not cover all your needs completely.
    Then JavaScript comes into play. Some starting points
    For basic javascript
    Code academy
    Mozilla developer network Getting started tutorial
    Specific for APEX documentation for the javaScript API
    And since APEX uses jQuery the jQuery learning centre.
    An other approach when you're on APEX 4.1+ have a look at the following plugin Live Validation
    This plugin supports a number of validation types with out the need of any programming. Check out the list of supported validation types here.
    Nicolette

  • I have 2 pages up I can't see how to exit one page and still have the other page up I have to close an re click on the icon

    I do not see a way to close one page. I may have 3or4 different pages up but I cannot close one page with out having to close fire fox entirely. I have to go back to your icon and start all over. Thanks Dave In Austin Texas

    Set the pref <b>browser.tabs.closeWindowWithLastTab</b> to false on the about:config page to prevent closing the last tab from closing the browser and make a close button appear if only one tab is open.
    *http://kb.mozillazine.org/about:config
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • I clicked on the live broadcast link for BBC radio4. Despite exiting the page, restarting my macbook, and shutting down and reopening thje broadcast continues. I can't access anything to turn it off. Please help!

    I clicked on the live broadcast link for BBC radio 4. Despite exiting the webpage, restarting the computer and shutting down and reopening, the braodcast continues. I cannot find a way to shut it off. I have tried reopening the BBC website, clicking on the live braodcast link and then closing it. I get 2 almost similtanteous broadcasts and when I click the close button only one switches off. Please help!

    Most unusual.
    Try a safe boot:
    http://support.apple.com/kb/ht1564
    Open Activity Monitor and see if you can identify any application that may be the culprit.  If so, click on it and then the "Quit Process' icon on the menu bar.
    Ciao.

  • How can I get an flv video to stop playing when I exit the page it's on?

    The audio continues to play no matter where I navigate on the site.
    Thanks

    You want to stop the audio from playing and also downloading more video/audio if it is still downloading when you go to a new keyframe where the video display/component or mp3 player is removed from the stage because it's keyframe ended or do not exist anymore but you still hear the audio.
    Add an event listener to your video playback component that calls a function when the flash player tries to remove the video plaer from the stage that stops the netstream or at least stops/pauses the video playback.
    [link removed]
    //sample NetConnection and NetStream classes when the video player is removed from the stage tell the NetStream to stop playing or downloading the content with .close();
    var connection:NetConnection = new NetConnection();
    connection.connect(null);
    var stream:NetStream = new NetStream(connection);
    addEventListener(Event.REMOVED_FROM_STAGE, videoRemovedFromStage);
    function videoRemovedFromStage(e:Event){
       stream.close();

  • After click to print on toolpanel, response.redirect will not exit page!

    On the aspx page where in either the init or page load I execute the code for the report, it will display, and the toolpanel appears, and I can click the printer icon and the report will print.
    It merrily reexeuctes the init and page load for every page in the report, which is insane, but from what I see searching Google, that is just the way it works.
    I can live with that, but here is the real problem.
    I have three buttons at top of page, each an http redirect to leave the page and go to another. I mean, I have to give the user a way out, right?
    They will work if clicked on first entering the page before printing the report.
    However, once you have clicked the icon in the Crystal toolpanel to print the report, YOU CANNOT ESCAPE THE PAGE! It will not go away.
    I even put in code to trap the id of the control clicked, skip the crystal report loading code, included close and dispose methods on Crystal report AND the crystalreportviewer object, even set the objects to null.
    Does not matter.
    Execution will jump to the button code and hit the response.redirect command. And just stay on the page. The page is still live, you can click the button again and again. Occasionally maybe one out of 30 clicks, it will exit the page.
    Note also, because of how Crystal is executing the init and page_load on every page in the report, it executes the page_unload on every pass, too, I discovered that by adding a page_unload and trying to put dispose code there.
    Here is the entire aspx page behind code. This is Visual Studio 2010, C#, CR for Visual Studio 13 installed.
        public partial class ReportInvoicePackingListPrint : mmBusinessWebPage
            private ReportDocument report = new ReportDocument();
            protected bool leavingpage;
            protected void Page_Load(object sender, EventArgs e)
                // Amazingly, clicking a control to LEAVE the page REEXECUTES THE PAGE LOAD!!
                // I do not understand why, but checking for the ID of the controls on the page allows you to return and skip the rest of the page load.
                Control ctrl = PageUtilities.GetPostBackControl(this.Page);
                // if (ctrl != null && (ctrl.ID == "btnMainMenu" || ctrl.ID == "btnNewSearchHeader"))
                if (ctrl != null &&
                            (ctrl.ID == "btnMainMenu"
                                || ctrl.ID == "btnLocateByCustomerInfo"
                                || ctrl.ID == "btnReportInvoicePackingList"
                    // We are going to redirect away to another page, OR we are re-entering and want to force !PostBack and Page_Load code.
                    // Skip Page_Load code and all the database calls and setup overhead.
                    leavingpage = true;
                    report.Close();
                    report.Dispose();
                    CrystalReportViewer1.Dispose();
                    CrystalReportViewer1 = null;
                    report = null;
                    return;
                string rpt_path = System.Web.HttpContext.Current.Server.MapPath("~/App_Reports_Crystal/InvoicePackingList.rpt");
                report.Load(rpt_path, CrystalDecisions.Shared.OpenReportMethod.OpenReportByDefault);
                // Retrive BatchNumber passed to this page and set the parm for the report object.
                string batchnumber = SessionProxy.BatchNumber;
                report.SetParameterValue("BatchNumber", batchnumber);
                CrystalReportViewer1.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None;
                CrystalReportViewer1.ReportSource = report;
            protected void btnReportInvoicePackingList_Click(object sender, EventArgs e)
                Response.Redirect("~/App_Reports_Pages/ReportInvoicePackingList.aspx", true);
            protected void btnMainMenu_Click(object sender, EventArgs e)
                Response.Redirect("~/App_Menus/MainMenu.aspx", true);
            protected void btnLocateByCustomerInfo_Click(object sender, EventArgs e)
                Response.Redirect("~/App_Pages/CustLookUp.aspx", true);

    Hi,
    I was too encountering the same problem. I had tried Uher's solution. It doesn't work.
    Plus in this QnA is there a resolution?? Below is my code.
    //Report1.aspx
    using CrystalDecisions.CrystalReports.Engine
    namespace Report1
         //Current Code using Page_Init to pre-Renders the report
         protected void Page_Init(Object sender, EventArgs e)
             if (!IsPostBack)
               LoadReport();
             else
                CrystalReportViewer1.ReportSource = (ReportDocument)Session["sessionCryRpt"];
       //Previous Code & this is not working so disable
       protected void Page_Load(object sender, EventArgs e)
       //  if (!Page.IsPostBack)
       //  {  LoadReport();  }
       protected void MainButton_Click()
        Response.Redirect("MainPage.aspx");
       protected void CrystalReportViewer1_Init()
       private void LoadReport()
        ConnectionInfo connectionInfo = new ConnectionInfo();
        connectionInfo.ServerName = @"server";
        connectionInfo.DatabaseName = "tbl1";
        connectionInfo.UserID = "sa";
        connectionInfo.Password = "sa";
        connectionInfo.Type = ConnectionInfoType.SQL;
        connectionInfo.AllowCustomConnection = true;
        string strParam = Convert.ToString(Request.QueryString["Param"]);
        label1.Text = strParam;
        ReportDocument cryRpt = new ReportDocument();
        Report1 crystalReport1;
        crystalReport1 = new Report1();
        cryRpt.Load(Server.MapPath("CrystalReport1.rpt"));
        SetDBLogonForReport(connectionInfo, cryRpt);
        cryRpt.SetParameterValue("Param", strParam);
        CrystalReportViewer1.SelectionFormula = "{Param}";
        CrystalReportViewer1.ReportSource = crystalReport1;
        CrystalReportViewer1.ReportSource = cryRpt;
        //Create session & assign ReportDocument to session
         Session["sessionCryRpt"] = cryRpt;
        private void SetDBLogonForReport(ConnectionInfo connectionInfo, ReportDocument reportDocument)
        Tables tables = reportDocument.Database.Tables;
        foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)
         TableLogOnInfo tableLogonInfo = table.LogOnInfo;
         tableLogonInfo.ConnectionInfo = connectionInfo;
         table.ApplyLogOnInfo(tableLogonInfo);
    //Report1.aspx code behind
    <%@Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Report1.aspx.cs"       Inherits="Project.Report" %>
    <td class="style5">
        <asp:Button ID="MainButton" runat="server" onclick="MainButton_Click"
           Text="Back To MainPage" Width="174px" CausesValidation="False" />
              </td>
    <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
           <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
                    EnableDatabaseLogonPrompt="False" ReuseParameterValuesOnRefresh="True"
                    AutoDataBind="True" Height="1269px" ToolPanelWidth="200px" Width="881px"
                    oninit="CrystalReportViewer1_Init" GroupTreeImagesFolderUrl=""
                    GroupTreeStyle-ShowLines="False" ReportSourceID="CrystalReportSource1"
                    ToolbarImagesFolderUrl="" ToolPanelView="None"
                    EnableParameterPrompt="False" SeparatePages="False" HasCrystalLogo="False"
                    HasToggleGroupTreeButton="False" HasToggleParameterPanelButton="False" />
                <CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
                    <Report FileName="CrystalReport1.rpt">
                    </Report>
                </CR:CrystalReportSource>
    </asp:Content>

  • Sound on Page exit

    I am trying to figure out a way to play a sound once you
    leave the swf of exit the swf. I do not want to create an exit
    button with the sound playing once you exit.
    It needs to play once you exit the browser window or exit the
    page.
    Is this possible?

    You would need to use ExternalInterface and javascript
    You can use JavaScript to detect the onbeforeunload event of
    the browser.
    Read:
    http://www.webreference.com/dhtml/diner/beforeunload/bunload4.html
    Once detected you can use the Javascript to call a function
    in your Actionscript that will play your sound. Or, you can simply
    play a sound directly from the Javascript, whichever you
    prefer.

  • Attempting to exit a tab in any fashion, the page puts up a dialog box and won't exit.

    When attempting to exit a tabbed page by any means, the page puts up a dialog box that occupies a vertical strip of the entire computer screen. It has a question mark and says "Are you sure you want to navigate away from this page?
    PRESS ESCAPE OR CLOSE THIS ALERT"
    When you press escape or close the alert, the dialog box goes away, but you don't exit the page.
    I suspect a malefactor has somehow captured the page and modified its behavior, so I doubt the reported URL will help.
    I need to find some foolproof way to close the tab.
    Thank you,
    John
    and won't exit.

    try clicking EDIT, on the upper ribbon of your firefox browser, then on the bottom click PREFERENCES, then on the top select the PRIVACY tab. On the right hand side under history there's a couple of buttons that say EXCEPTIONS and show cookies, select EXCEPTIONS and click on the website that is preventing you from closing the tab. Then on the bottom click REMOVE SITE. you can also remove cookies this way. Restart your computer and it should be normal. This worked for me, I hope it works for you!
    oh yeah by the way when you click the PRIVACY tab, make sure the "Firefox will: use custom settings for history" option is selected.

  • How to remove the page break for CSV report

    Hi,
    I'm working on a rdf report and have an issue with page break.
    As usual there exits a page break in the report output. how do I remove it.
    work around: set Page break before/after : NO
    worked on margin re-size, how ever could not resolve the issue.
    Can any one help me on this.
    Thanks in advance.
    Thanks,
    Santhosh

    There are two ways to do this:
    1) If you want to remove and individual dimension from a presentation, you can hide the dimension. This can be performed directly from within QueryBuilder. Within the first section of Query Builder that shows the selected measures selected and associated dimensions, simply remove the required dimensions from the right dialog panel.
    2) To hide all page items within a presentation, simply add the following the property, pagingControlVisible="False", to the presentation tag in your JSP. For example:
    <orabi:Presentation location="Local Computer Sales/Products/KPI Sales Prior Period and Prior Year" id="BIProductKPIs_pres2" pagingControlVisible="False"/>
    Hope this helps
    Business Intelligence Beans Product Management Team
    Oracle Corporation

  • When restarting firefox after a crash, how do I stop it from re-opening all web pages that were open at the time of the crash?

    When firefox crashes, or if it hangs and I have to kill it, then when I go to restart it, it tries to re-open all pages that were open at the time it crashed or was killed. This is incredibly annoying, especially if one of the visited pages caused the crash or hang. It is also really annoying if some of the web pages happened to require passwords to log in, from multiple sites. In my case this occurs as I am frequently logged into multiple online educational web sites like ucsc-extension.edu and berkleemusic.com. In the login case you get multiple login prompt pop-ups with no way to correlate which pop-up goes with which web page. If there are a lot of them then it's a hopeless mess. This behavior is something that I never ever want and it infuriates me that not only is it the default behavior, it is something that there seems to be no way to turn off, at least via the configuration menus. Am I wrong? Is there a way to turn this off? If not can somebody either make it configurable or get rid if this fantastically idiotic behavior?
    I suspect there's a command line option for this but on my Mac (or most systems these days) it's sort of "unnatural" to be starting programs like browsers by means other than a provided program start-up icon, which gives you no choice about the command line options.
    Besides, as a default behavior the current behavior is something I cannot conceive of ever wanting. I would rather have a poke in the eye with a sharp stick.
    == This happened ==
    Every time Firefox opened
    == firefox crashed

    You can try this.
    In the address bar type about:config you will be warned that this is dangerous.
    Search for browser.sessionstore.resume_from_crash
    Double click on true to toggle it to false.
    Exit the page.
    Firefox will now NOT try to reload websites after a crash.

Maybe you are looking for

  • Windows Vista - enter CD and it says iTunes has encountered an error. Help?

    Basically, I bought a iPod the other day and installed the latest version of iTunes. I put a CD in to rip and within seconds of ripping I got a message saying 'iTunes has encountered an error and needs to close. Windows will contact you if there is a

  • Major Problem with audio from Final Cut to DVd Studio Pro

    I am posting this problem again because no further responses have been received regarding my first post. I purchased an MR-HD100 Firestore device from Focus Enhancements. When I use clips from it alone or with other clips created by digitizing from m

  • Sound in video chat

    When using video chat my friend can hear me but I can't hear her. We're both using macs. After this happened, she brought her computer to the apple store where they checked it and said it wasn't a problem on her side. I've looked at the solutions tha

  • My ISP slaps a surcharge on use of iChat A/V

    My ISP recently started blocking the ports used for iChat A/V and other peer-to-peer services and wants an extra $5.00 per month to open them. They say they have had to install expensive special equipment at their facility to process audio and video

  • Unknown Error - Sharepoint Search - Sharepoint 3.0

    We're recieving an unknown error performing any search on sharepoint. I'm also getting an error when accessing the "Manage Search Service" tool. Here is our recent log. I'm not sure what to look at. 01/08/2014 09:00:32.63  wmiprvse.exe (0x12A0)