Ian,

I was about to ask the same question.  I thought you were posting to a cold 
fusion page, hence I was giving you cold fusion code to use to check for the 
form submission.

To accomplish what you want to do, I only see three options:

1.  Modify the perl script to set a cookie, then you can look for that cookie 
in your cold fusion page that displays the form (don't know if setting a cookie 
is possible in perl as I know *squat* about perl).

2.  Change your form processor to a CF page.

3.  I haven't tried this, but theoretically, you could set a cookie with 
javascript during the form 'onsubmit' event.  A quick search resulted this 
page:  

which said you can set a cookie in javascript like this:  document.cookie = 
"name=value";, so I would do something like this:

<cfoutput>
<form action="cgi-bin/subqs.pl" method="post" target="_top" 
onsubmit="document.cookie = 'localip=#cgi.remote_addr#';">
</cfoutput>

Then, at the top of your page, change your <CFIF to this:

<cfif isDefined("cookie.localip") and cookie.localip EQ cgi.remote_addr >
  STOP!
  <cfabort>
</cfif>

Just FYI - You don't need to put # signs around a coldfusion variable when it 
is contained within another cold fusion tag or function.

Hope this helps!

Dave

-----Original Message-----
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED]
Sent: Monday, July 25, 2005 10:10 AM
To: CF-Talk
Subject: RE: Restricting Access


How are you setting this client variable if the calling page is posting to a
perl script?  I am not sure how this is possible?  You would need to have
form posting to cf page which sets the client var.



-----Original Message-----
From: Ian Vaughan [mailto:[EMAIL PROTECTED] 
Sent: 25 July 2005 15:15
To: CF-Talk
Subject: RE: Restricting Access

Still not working very frustrating, can you see from the code why the
form keeps displaying instead of the STOP message as I have submitted
the form !

When I run a cfdump var="#client.localip#"> it comes back with an error
' Element LOCALIP is undefined in CLIENT.  '

<cfif isDefined("client.localip") and client.localip EQ
#cgi.remote_addr# >
  STOP!
  <cfabort>
</cfif>


 <cfif isDefined("form.v4")> 
   <cfset client.localip = #cgi.remote_addr#>
</cfif>



<form action="cgi-bin/subqs.pl" method="post" target="_top">
<input type="hidden" name=":SURVEY:" value="Questionnaire2">
<input type="hidden" name=":EMAIL:" value="[EMAIL PROTECTED]">
<input type="hidden" name=":USERID:" value="069/001">

<input type="hidden" name="V4" value="">
<input type="hidden" name="V20" value="">
<input type="hidden" name="V21" value="">

</form>





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212736
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to