• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Browser back button click

 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys,

Is there a way wherein I show a alert when the user clicks the back button and it the alert dialog, show Ok and Cancel wherein Cancel will do nothing and Ok will take me back? Am I violating any laws of the universe by doing this? Is my way of handling the back button functionality wrong?

What I have is a web page which has a couple of buttons and on click of those buttons, I just refresh a div in that page. Eventually it is a series of steps and when the user is in say 5th step, and he clicks back, he looses all what he has done till Step 5 and I do not want this to happen. Also I have a session maintained (of course I have a time out to kill it), I do not want stale sessions to sit in my memory.

Suggestions on how to handle this?
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no way of knowing if the back button was clicked or if the user closes the window.

Eric
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic