Ask a Question related to ASP Database, Design and Development.
-
weiwei #1
asp page with logout issues
Hi
I am having a problem with my asp application. here is very simple
description. I created a user login.asp,
that user login with his username and password, once he in, he can
fill out several application forms...so on.
at the last, if user click logut, it will leave that applicaiton and
redirect to the main URL. So far, I don't
have problmes except with the logout page. B/s when I click logout and
it brings me to the main website. However,if
I click the back button from the browser, it still brings me back the
asp application. is there anyway that once
you logout, and you cann't going back to your asp application.
Below is my simple code, thanks in advance.
'--------------------------------------------------------------
td><form method="post" action="applicationshell.asp" onsubmit="return
validateForm(this)" id=form1 name=form1>
<table width="100%" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td colspan="2"><font size="2"
face="Tahoma"><strong>Enter
your username and password in
the boxes
below:</strong></font></td>
</tr>
<tr>
<td width="18%"><font size="2"
face="Tahoma">Username:</font></td>
<td width="82%"><font size="2"
face="Tahoma">
<input name="username"
type="text" maxlength="50">
</font></td>
</tr>
<tr>
<td><font size="2"
face="Tahoma">Password:</font></td>
<td><font size="2" face="Tahoma">
<input name="password"
type="password" maxlength="9">
</font></td>
</tr>
<tr>
<td> </td>
<td><font size="2" face="Tahoma">
<input type="submit"
name="Submit" value="Login">
<input type="reset"
name="Submit2" value="Reset">
</font></td>
</tr>
</table>
</form></td>
'-----------------------------------------------------------------------
<%
strusername = request.form("username")
strpassword = request.form("password")
%>
<!--#include file="includes/connection.inc"-->
<%
strquery = "SELECT username, password "& _
"FROM Identi " & _
"WHERE username= '" & strusername & "' and password= '" &
strpassword & "'"%>
<%Set rsname = ConnCW.Execute(strquery)%>
<%
If rsname.eof Then
response.redirect("xxx.xxx.com")
else
End If
%>
td><form name="applicationupdateform" method="post"
action="thankyou.asp">
<tr>
<td height="13"><font size="1" face="Tahoma">Positions
Apply Informations</font></td>
<td><font color="#FF0000" size="1"
face="Tahoma">Completed</font><font size="1" face="Tahoma">
- Please <a href ="positioninfoupdate.asp?id=<%=strpassword%>"
target="_blank" style="color:#0000ff">click
</a>to update your information</font></td>
</tr>
</table></td>
</tr>
<tr>
<td><input type="submit"
name="Submit" value="Exit">
'---------------------------------------------------------------
<tr>
<td><div align="left"><font size="2"
face="Tahoma">
Successful logout. <a
href="http://www.slps.org" style="color:#000000">Click</a>
to return to main
page</font></div></td>
</tr>
weiwei Guest
-
logout(without getting page using back button)
hi i would like to implement a logout page which is very secure so that after logging out a user cannot use the back button for accessing the... -
Viewing COMDLG32 from an ASP page issues
We have an ASP page that generates a report. We have included a button on the page that allows the user to save the report as a .csv file. The... -
[PHP] Front Page User Logout
How can I provide a link which will log the current user out so that they will be prompted again to login. I'm using frontpage authentication on... -
Front Page User Logout
How can I provide a link which will log the current user out so that they will be prompted again to login. I'm using frontpage authentication on an... -
after logout, how to retrieve an expired page if user click 'back' button?
hi everyone, i've made a login and logout page, after user have logout, i want to retrieve an expired page if user click the 'back' button to... -
Ray at #2
Re: asp page with logout issues
Disallow page caching on your session-protected pages. (I'm assuming you're
using sessions to determine if the user is logged in, but that's beside the
point.)
[url]http://www.aspfaq.com/show.asp?id=2022[/url]
Ray at work
"weiwei" <Wei.Huang@slps.org> wrote in message
news:d32b0478.0402251311.7724ce13@posting.google.c om...> Hi
> I am having a problem with my asp application. here is very simple
> description. I created a user login.asp,
> that user login with his username and password, once he in, he can
> fill out several application forms...so on.
> at the last, if user click logut, it will leave that applicaiton and
> redirect to the main URL. So far, I don't
> have problmes except with the logout page. B/s when I click logout and
> it brings me to the main website. However,if
> I click the back button from the browser, it still brings me back the
> asp application. is there anyway that once
> you logout, and you cann't going back to your asp application.
> Below is my simple code, thanks in advance.
Ray at Guest
-
Bullschmidt #3
Re: asp page with logout issues
That's just the nature of the Back button.
But if interested you can check this out.
A1ien51's disable the Back Button
[url]http://www10.brinkster.com/A1ien51/Scripts/BackButton.htm[/url]
What is going to happen, is when the page loads, it will send the surfer
to the last page in their history.
Now if a person tries to go back to it, then it will send them directly
back to the page they pushed the back button on!
Add this code to the header of your page:
<script>
history.forward();
</script>
JPS: Thus need to put the code on the page you don't want the user to be
able to go back to.
And here is my version of it:
<script type="text/javascript"> <!--
// Disable browser's Back button on another pg being able to go back to
this pg.
history.forward();
//-->
</script>
But if the page you put this on uses alert boxes for validation, may see
that again.
Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
[url]http://www.Bullschmidt.com[/url]
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Bullschmidt Guest



Reply With Quote

