<cfscript>
function randString(ct){
var i=1;
var randStr="";
var randNum="";
var useList="";
for(i=1;i LTE ct;i=i+1){
randNum=RandRange(1,10);
useList="0,1,2,3,4,5,6,7,8,9";
randStr="#randStr##ListGetAt(useList,randNum)#";
}
return randStr;
}
if ( NOT IsDefined('message') ) {message = "";}
if ( IsDefined('form.authorization')
AND IsDefined('session.authorization') ) {
if ( compare(form.authorization,session.authorization) EQ 0 ) {
message = "we have a match!";
writeOutput("we have a match!");
}else{
message = "sorry, test failed";
writeOutput("sorry");
}
}
</cfscript>
<cfif IsDefined('form.authorization') >
<cflocation url="" addtoken="No">
</cfif>
<cflock timeout="20" throwontimeout="No" name="authorization" type="EXCLUSIVE">
<cfscript>
thisPath = ExpandPath("*.*");
thisDirectory = GetDirectoryFromPath(thisPath);
image = thisDirectory & "createimage.gif";
newimage = thisDirectory & "newimage.gif";
theText = randString(4);
session.authorization = theText;
</cfscript>
</cflock>
<!--- Gets image attributes --->
<CFX_IMAGE FILE="#image#"
ACTION=""> TEXT="#theText#"
OUTPUT="#newimage#"
FONT="GIANT"
X="8"
Y="2">
<CFHEADER NAME="Expires" VALUE="#now()#">
<CFHEADER NAME="Pragma" VALUE="no-cache">
<CFHEADER NAME="cache-control" VALUE="no-cache, no-store, must-revalidate">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test</title>
</head>
<body style="color: Black; background-color: White;">
<a href="" style="color: Black; background-color: White;">reload page</a>
<br>
<cfoutput>
<h3>#message#</h3>
#theText#
<img src="" width="56" height="20" alt="">
</cfoutput>
<form action="" method="post">
<input type="text" name="authorization" size="4" maxlength="4" style="color: Black; background-color: White;">
<input type="Submit" value="Test" style="color: Black; background-color: White;">
</form>
</body>
</html>
>can you show the code?
>
>-----Original Message-----
>From: Stan Winchester [mailto:[EMAIL PROTECTED]
>Sent: Friday, April 02, 2004 12:24 PM
>To: CF-Talk
>Subject: Re: Force image refresh
>
>yes, I am using cflocation
>image.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

