Forum Moderators: open
<% Session ("user") = their name %>
Then, on every page within the site, I include a simple timeout.asp which looks like this:
<% if String(Session("user")) == "undefined") {
Response.Write("<script type='text/javascript'>alert('You have timed out, please login again.');</script");
Response.Redirect("login.asp");
} else {
%>
Then, at the bottom of the page I include timeoutclose.asp which looks like this:
<% } %>
That's pretty simple.
So, if your session is empty, and the String() function tries to convert it to a string, it will return "undefined" as the value, and make the IF statement TRUE, therefore setting off the javascript alert, and redirecting to the login.asp page.
Sorry if that's still confusing.
-Matt
vs.
if session("user") == "undefined" then
//alert
//redirect
end if
I think I may be making this more difficult on myself than it really is. But I really appreciate all the help!
Thank you