|
 |
asp_web_howto thread: Refreshing a page through asp
Message #1 by "Tbarnes" <dev@o...> on Thu, 28 Mar 2002 14:57:16 -0500
|
|
Hello all,
Is it possible to refresh a page through asp? I have an app that uses sessions. Let's say the session is set for 15min well, I
want the page to refresh it self @ 16min causing the page then to be redirected to login.asp page. The thing is though I only want
the page to refresh if and only if the session has expired...is this possible, better yet can anyone help me with how to do this?
Thanks,
Thomas
Message #2 by "David Debreceni" <debreceni.david@h...> on Thu, 28 Mar 2002 20:39:47
|
|
I think this should work and force the page to reload after 16 minutes.
The setTimeout should be reset every time it navigates to a new page.
Hope this works for ya.
<SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
function myReload() {
var loc = document.location;
loc.reload(true);
}
setTimeout("myReload()", 960000);
</SCRIPT>
David Debreceni
Senior Visual Basic/ASP Developer
xxx-xxx-xxxx x 1086
Message #3 by Jack_Speranza <jsperanza@g...> on Thu, 28 Mar 2002 16:05:57 -0500
|
|
You may also include the following header in your HTML:
<META HTTP-EQUIV="REFRESH" CONTENT="_X_">
(where _X_ is the interval, in seconds, that you want your page to
reload)
Cheers,
Jack
-----Original Message-----
From: David Debreceni [mailto:debreceni.david@h...]
Sent: Thursday, March 28, 2002 3:40 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Re: Refreshing a page through asp
I think this should work and force the page to reload after 16 minutes.
The setTimeout should be reset every time it navigates to a new page.
Hope this works for ya.
<SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
function myReload() {
var loc = document.location;
loc.reload(true);
}
setTimeout("myReload()", 960000);
</SCRIPT>
David Debreceni
Senior Visual Basic/ASP Developer
xxx-xxx-xxxx x 1086
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
Message #4 by "Tbarnes" <dev@o...> on Fri, 29 Mar 2002 00:37:14 -0500
|
|
Those both work fine for refreshing a page, but the tricky part is I only want to refresh the page if
the sessiontimesout. I am looking to see if I can do this through asp...in theory something like:
<%
IF Session.Timeout = True Then
Refresh Page...
%>
Thanks,
Thomas S. Barnes---------- Original Message ----------------------------------
From: Jack_Speranza <jsperanza@g...>
Reply-To: "ASP Web HowTo" <asp_web_howto@p...>
Date: Thu, 28 Mar 2002 16:05:57 -0500
>You may also include the following header in your HTML:
>
> <META HTTP-EQUIV="REFRESH" CONTENT="_X_">
> (where _X_ is the interval, in seconds, that you want your page to
>reload)
>
>
>Cheers,
> Jack
>
>-----Original Message-----
>From: David Debreceni [mailto:debreceni.david@h...]
>Sent: Thursday, March 28, 2002 3:40 PM
>To: ASP Web HowTo
>Subject: [asp_web_howto] Re: Refreshing a page through asp
>
>
>I think this should work and force the page to reload after 16 minutes.
>The setTimeout should be reset every time it navigates to a new page.
>Hope this works for ya.
>
><SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
>function myReload() {
>
>var loc = document.location;
>
>loc.reload(true);
>
>}
>setTimeout("myReload()", 960000);
></SCRIPT>
>
>
>
>David Debreceni
>Senior Visual Basic/ASP Developer
>xxx-xxx-xxxx x 1086
>
>---
>
>Improve your web design skills with these new books from Glasshaus.
>
>Usable Web Menus
>http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
>r-20
>Constructing Accessible Web Sites
>http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
>r-20
>Practical JavaScript for the Usable Web
>http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
>r-20
>
>
>---
>
>Improve your web design skills with these new books from Glasshaus.
>
>Usable Web Menus
>http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
>r-20
>Constructing Accessible Web Sites
>http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
>r-20
>Practical JavaScript for the Usable Web
>http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
>r-20
>
|
|
 |