PDA

View Full Version : Expiry function that cannot work....


scriptblur
10-02-2002, 08:54 AM
Hi guys, can anyone please kindly help me??? thank.


i wants to do a expiry function on an asp page however it does not work? What i wants is that when i logout of an asp (log out)page and redirected to another asp page and when i click back button to the previous asp (log out) page, it will show expiry.

like the one codingforums.com does for the posting. it will shows expires..... warning....


<% @ Language=VBScript %>
<% Option Explicit %>
<% Response.Expires = 1 %> // can't function
<HTML>
<HEAD>
<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
<link href="../style_sheet/Verdana.css" rel="stylesheet" type="text/css">
<TITLE>log_out</TITLE>
<script language="javascript">
function closewin()
{
onClick="window.close()"
}

var start=new Date();
start=Date.parse(start)/1000;
var counts=10;
function CountDown(){
var now=new Date();
now=Date.parse(now)/1000;
var x=parseInt(counts-(now-start),10);
if(document.form1){document.form1.clock.value = x;}
if(x>0){
timerID=setTimeout("CountDown()", 100)
}else{
location.href="../ad_login.asp"
}
}

window.setTimeout('CountDown()',100);

</script>
</HEAD>
<BODY bgcolor="#feffe8">
<table width=100% align="center">
<tr>
<td align="center">
<!-- URL's used in the movie-->
<!-- text used in the movie-->
<!--Logged Out Successfully--><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="480" HEIGHT="60" id="log_out" ALIGN="">
<PARAM NAME=movie VALUE="log_out.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor> <EMBED src="log_out.swf" quality=high bgcolor="#feffe8" WIDTH="480" HEIGHT="60" NAME="log_out" ALIGN=""
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>
</td>
</tr>
<tr>
<td align="center">
<FORM NAME="form1">
<font face="Verdana"><b>You are being redirected to the Login page<br>
<INPUT TYPE="text" NAME="clock" SIZE="2" VALUE="10"><br>
seconds.</b></font>
</FORM>
</td>
</tr>
<tr>
<td align="center" class ="verdana" > <a href="javascript:window.close()"> Close This Window</a><p>
</td>
</tr>
</table>

</BODY>
</HTML>

glenngv
10-02-2002, 09:17 AM
try
response.expires=0

and read http://msdn.microsoft.com/library/en-us/iisref60/htm/ref_vbom_resope.asp

scriptblur
10-02-2002, 09:23 AM
Hi Glenn,

It still doesn't work.....

glenngv
10-02-2002, 09:29 AM
follow the link I added to my previous post
plus this: http://www.experts-exchange.com/Web/Web_Languages/ASP/Q_11499358.html