Rewiring the Back ButtonBy TJ Sylvester
Often there is a need for a form to "expire". Once a user submits a form, if they attempt to navigate back
to the expired form (via the back button), they will instead be rerouted to an ASP page other than the expired
form. Netscape supports a cache feature in the
META tags to support this, but Internet Explorer
does not. A simple work around is available for applications that must have this.
This article will not go into great detail of an application for this work around, but merely to steer you into the right direction.
The work around consists of four pages. The first page is the default page (
this is the page you would want your users to return to.
default.asp will contain a simple hyperlink
to the ASP page that contains the form you would like your users to fill out.
contain the following simple code:
The second page,
form.asp, would display the form to the user. This ASP page also needs
to determine whether or not the user has returned to it from hitting the back button or not. If they have
(that is, the user has already entered the form information once before, and the form has "expired"), then
the user needs to be redirected to a different ASP page (
default.asp in this example).
Now that we've looked at how to create the first two pages, in Part 2 we'll look at how to create the remaining two pages!