onbeforeunload and a warning against loosing data

Discussion in 'Javascript' started by My4, Aug 16, 2005.

  1. My4

    My4 Guest

    Dear Sirs,

    I want to give the user of my intranet a warning that if he uses the
    explorers right corner 'X' to close the browser he looses his information. I
    tried to prevent him from closing, or saving the data, but this seems
    impossible, so a warning like 'the things you just typed must be entered
    again probably' is good enough. I prefere onbeforeunload for onunload, which
    is more standard, since the data that is soon to be lost, are still readable
    on the screen.

    I have two questions I cannot find the answer for using for example google:

    1. To date, how standard is this event? The intranet users only use I.E. and
    Netscape, and we can control the versions.

    2. When is this event exactly fired? It seems that in I.E. it is not only
    fired when using the corner "X" but also when I use a popup window to open a
    calender in the form. Hence the effect was that I got a message: 'your data
    is lost' when I opened a calender subwindow. Which is nonsence off course.
    Can I check somehow where the event comes from? Or is there another clever
    way to prevent this from happening

    Kind Regards,

    Jalisey Leyanis Escalona Alvarez
     
    My4, Aug 16, 2005
    #1
    1. Advertising

  2. My4

    Lee Guest

    My4 said:
    >
    >Dear Sirs,
    >
    >I want to give the user of my intranet a warning that if he uses the
    >explorers right corner 'X' to close the browser he looses his information.


    To "loose" something means to release it, willingly.
    Maybe you mean "lose"?
     
    Lee, Aug 16, 2005
    #2
    1. Advertising

  3. My4

    VK Guest

    > onbeforeunload and a warning against loosing data

    By using a bit Google Groups search:

    <http://groups-beta.google.com/group/comp.lang.javascript/browse_frm/thread/9e071a9d1bfb53af/afd6ed772e04fa6d?lnk=st&q=onbeforeunload+group:comp.lang.javascript+author:VK&rnum=5&hl=en#afd6ed772e04fa6d>

    <http://groups-beta.google.com/group/comp.lang.javascript/browse_frm/thread/2b000aaf0703810a/0f741ad09b618ae6?lnk=st&q=sorry+life+group:comp.lang.javascript+author:VK&rnum=1&hl=en#0f741ad09b618ae6>

    <http://groups-beta.google.com/group/comp.lang.javascript/browse_frm/thread/1b5b03d812669f78/9c50a94a1dcfd751?lnk=st&q=onbeforeunload+group:comp.lang.javascript+author:VK&rnum=1&hl=en#9c50a94a1dcfd751>

    Please pay special attention to the last thread. In a good programming
    environment you don't need to *nug your clients* that they gonna lose
    their data. You have to ensure that *they will not loose their data*
    neither in case of the window closure, nor in case the computer
    shootdown, nor in any other. This goes beyond the scope of JavaScript
    though. The first two threads explain the loosy (double "o" :) way to
    handle the situation by staying withing the client-side scripting.
     
    VK, Aug 16, 2005
    #3
  4. My4

    VK Guest

    > *they will not loose their data*

    It's getting contagious :)

    *they will not LOSE their data*
     
    VK, Aug 16, 2005
    #4
  5. My4

    My4 Guest

    "Lee" <> schreef

    > To "loose" something means to release it, willingly.
    > Maybe you mean "lose"?


    Are you a school teacher??

    Please understand that English is not the first language of many posting on
    the newsgroups and it;s annoying if you get corrected for each little
    spelling mistake you make. More then that even, most people who know English
    or do have English as a first language are not able to make one decent
    sentence in another language themselves.

    So if you want to play teacher, please translate my first message in Dutch,
    Spanish, German and French, so I can make comments?
     
    My4, Aug 17, 2005
    #5
  6. My4

    My4 Guest

    "VK" <> schreef

    > By using a bit Google Groups search:


    Thank you, I found that information really usefull
     
    My4, Aug 17, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. basic
    Replies:
    3
    Views:
    6,160
    Wendy S
    Jan 27, 2005
  2. gilgantic
    Replies:
    0
    Views:
    609
    gilgantic
    Oct 17, 2005
  3. Fabian Kr?ger
    Replies:
    0
    Views:
    429
    Fabian Kr?ger
    Nov 19, 2003
  4. B Thomas

    Warning against Scanf

    B Thomas, Dec 24, 2003, in forum: C Programming
    Replies:
    12
    Views:
    644
    Tak-Shing Chan
    Dec 30, 2003
  5. Paul
    Replies:
    2
    Views:
    303
Loading...

Share This Page