| Author |
Prevnting a User Going Back
|
|
|
| This is for an Intranet application before I continue.
I have a fairly complex form that users will be filling in, which is spread
over several pages.
This is all ASP by the way.
I do not want a user on page 3 for instance to be able to click back and go
to page 2 - I want them to be forced to go back to page 1.
Is there a way to do this?
I know I can do a response.redirect, but can I be selective and
response.redirect if the previous page was form3 etc.?
| |
| Paul Anthony 2004-03-30, 8:11 pm |
| You can obtain the referrer using Request.ServerVariables("HTTP_REFERRER")
Paul.
"Keith" <@.> wrote in message news:c3ufof$36j$1@forums.macromedia.com...
> This is for an Intranet application before I continue.
>
> I have a fairly complex form that users will be filling in, which is
spread
> over several pages.
>
> This is all ASP by the way.
>
> I do not want a user on page 3 for instance to be able to click back and
go
> to page 2 - I want them to be forced to go back to page 1.
>
> Is there a way to do this?
>
> I know I can do a response.redirect, but can I be selective and
> response.redirect if the previous page was form3 etc.?
>
>
| |
|
| Hey Paul,
This is a very usefull script that i use to stop people hitting the back
button and running scripts twice ect...
<%
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
If Len(Session("FirstTimeToPage")) > 0 then
'The user has come back to this page after having visited
'it... wipe out the session variable and redirect them back
'to the login page
Session("FirstTimeToPage") = ""
Response.Redirect "/Alerts/PageExpired.asp"
Response.End
End If
'If we reach here, the user can view the page, create the form
Session("FirstTimeToPage") = "1"
%>
Just rename the session for each form and put it at the top of each page...
Regards
Bill
"Paul Anthony" <paul@(NOSPAM)netramedia.com> wrote in message
news:c3v0jj$5b$1@forums.macromedia.com...
> You can obtain the referrer using Request.ServerVariables("HTTP_REFERRER")
>
> Paul.
>
>
> "Keith" <@.> wrote in message news:c3ufof$36j$1@forums.macromedia.com...
> spread
> go
>
>
|
|
|
|
| Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |