Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes HTML, CSS and JavaScript and the fly likes need help when people hit back button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "need help when people hit back button" Watch "need help when people hit back button" New topic

need help when people hit back button

Judy Herilla
Ranch Hand

Joined: Jan 05, 2001
Posts: 89
I have a page that generates an alert when a value is passed from the server.
i.e. "Updates saved successfully."
My problem is, when people go to the next page, then Hit the back button, they see the alert message again.
I dont want this to happen, but Im not sure hwo to reset something, that I believe is in the "header"?

swaroop shastri
Ranch Hand

Joined: Aug 15, 2001
Posts: 65
You might need to use cookies to keep track as to whether the alert was already shown.
Alternately you can use frames. set/reset a variable in an "hidden" frame depending on whether the alert has displayed or not.
I agree. Here's the link:
subject: need help when people hit back button
Similar Threads
Form resubmit on Back Button
How to clear a request attribute/entry
how expire a page
Log out functionality
Page Expired but Session is active