Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Old 06-27-2006, 12:42 PM Time out
Skilled Talker

Posts: 95
Trades: 0
I have a page that holds sensative information about users.

I want the page to not display ie redirect to another page after a certain amount of inactive time has passed.

Is this possible in ASP or is this better left to something like Javascript.

Either way are they any dangers that doing this would open up.
higginbt is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-27-2006, 03:42 PM Re: Time out
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Can't be done with ASP at all.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-28-2006, 09:07 AM Re: Time out
Unknown.

Posts: 1,693
Trades: 0
Should be able to achieve this using javascript, like as follows..
HTML Code:
<script type="text/javascript">
setTimeout("window.location = 'http://www.google.com/'",30000);
</script>
Eg. that would redirect to google after 30 seconds (1 second = 1000)

But ofcourse you would need to account for the fact that if users are entering information on the page they are likely to take longer.. so for example have it so if the user presses a key or clicks anything it resets the timer, but thats the basic idea.

More info on setTimeout here.. http://www.htmlite.com/JS018.php
Dark-Skys99 is offline
Reply With Quote
View Public Profile
 
Old 07-03-2006, 06:00 AM Re: Time out
Skilled Talker

Posts: 95
Trades: 0
hi thanks Dark-skys99.

In the end i did in fact use javascript i had a simple counter counting down from 2.5 minutes from the instance the page opened.

The time would reset to 2.5 minutes continue couting down if the user moved the mouse. As there is no input on the screen i figured that 2.5 minutes more than long enough for a user to look at the screen and take it all in.

I could post the code perhaps if a mod would like to move this to the java script forum.
higginbt is offline
Reply With Quote
View Public Profile
 
Old 07-03-2006, 12:17 PM Re: Time out
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
There is a non-Javascript way to do this.
Code:
<meta http-equiv="refresh" content="3;url='http://www.lightenupontario.ca/" />
Where 3 is the value in seconds.

The problem is that the web browser has to support redirects, and some people configure theirs not to.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 07-03-2006, 12:43 PM Re: Time out
Skilled Talker

Posts: 95
Trades: 0
Adam correct me if i'm wrong, but that method redirects after 3 seconds whether or not the user is inactive. I only want to redirect after a set amount of time inactivity from the user.

so this is how i did it. I know its Javascript and this is ASP but no biggy right.
<head>
<script type="text/javascript">
<!--
function timer() {
time1=window.setTimeout("redirect()",150000);
}
function redirect() {
window.location = "inactive.asp"
}
function detime() {
window.clearTimeout(time1);
timer();
}
// -->
</script>

</head>
<body onload="timer()" onmousemove="detime()">
higginbt is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Time out
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.38551 seconds with 12 queries