**URGENT** is there anyway to stop the unload method?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: **URGENT** is there anyway to stop the unload method?

  1. #1
    Brian Chwyl Guest

    **URGENT** is there anyway to stop the unload method?


    Hi,

    Is there anyway to stop a window from completing the unload function when
    the browsers close button is clicked?

    I need to display a confirm box when a user closes the browser asking if
    the want to leave without submitting a form. Is this possible?

    Any help is appreciated.

    Thanks,
    Brian



  2. #2
    Esther Strom Guest

    Re: **URGENT** is there anyway to stop the unload method?


    Brian,

    In IE5, there's an event called onBeforeUnload. It allows you to actually
    stop the page from unloading if the user clicks No or Cancel in a confirm.
    Unfortunately this only works in IE5, and I haven't had any luck finding
    a workaround for IE4 and NS. If you get any other replies, I'd appreciate
    hearing them, because I need this function too.

    "Brian Chwyl" <bchwyl@clearpicture.com> wrote:
    >
    >Hi,
    >
    >Is there anyway to stop a window from completing the unload function when
    >the browsers close button is clicked?
    >
    >I need to display a confirm box when a user closes the browser asking if
    >the want to leave without submitting a form. Is this possible?
    >
    >Any help is appreciated.
    >
    >Thanks,
    >Brian
    >
    >



  3. #3
    Hilmar Guest

    Re: **URGENT** is there anyway to stop the unload method?


    I've used the onbeforeunload button on IE5 too. It works really well (especially
    when used with the cloneNode function to detect any changes on the before
    and after images), except as far as we could see, it's only possible to customize
    part of the message, i.e. the top and bottom parts of the text are fixed,
    as is the type of buttons available on the message. Any ideas on working
    around this?

    Hilmar

    "Esther Strom" <esther.strom@marchfirst.com> wrote:
    >
    >Brian,
    >
    >In IE5, there's an event called onBeforeUnload. It allows you to actually
    >stop the page from unloading if the user clicks No or Cancel in a confirm.
    >Unfortunately this only works in IE5, and I haven't had any luck finding
    >a workaround for IE4 and NS. If you get any other replies, I'd appreciate
    >hearing them, because I need this function too.
    >
    >"Brian Chwyl" <bchwyl@clearpicture.com> wrote:
    >>
    >>Hi,
    >>
    >>Is there anyway to stop a window from completing the unload function when
    >>the browsers close button is clicked?
    >>
    >>I need to display a confirm box when a user closes the browser asking if
    >>the want to leave without submitting a form. Is this possible?
    >>
    >>Any help is appreciated.
    >>
    >>Thanks,
    >>Brian
    >>
    >>

    >



  4. #4
    Hilmar Guest

    Re: **URGENT** is there anyway to stop the unload method?


    I've used the onbeforeunload event on IE5 too. It works really well (especially
    when used with the cloneNode function to detect any changes on the before
    and after images), except as far as we could see, it's only possible to customize
    part of the message, i.e. the top and bottom parts of the text are fixed,
    as is the type of buttons available on the message. Any ideas on working
    around this?

    Hilmar

    "Esther Strom" <esther.strom@marchfirst.com> wrote:
    >
    >Brian,
    >
    >In IE5, there's an event called onBeforeUnload. It allows you to actually
    >stop the page from unloading if the user clicks No or Cancel in a confirm.
    >Unfortunately this only works in IE5, and I haven't had any luck finding
    >a workaround for IE4 and NS. If you get any other replies, I'd appreciate
    >hearing them, because I need this function too.
    >
    >"Brian Chwyl" <bchwyl@clearpicture.com> wrote:
    >>
    >>Hi,
    >>
    >>Is there anyway to stop a window from completing the unload function when
    >>the browsers close button is clicked?
    >>
    >>I need to display a confirm box when a user closes the browser asking if
    >>the want to leave without submitting a form. Is this possible?
    >>
    >>Any help is appreciated.
    >>
    >>Thanks,
    >>Brian
    >>
    >>

    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center