Using ColdFusion 2018, and trying to add a progress bar on an API call.Created a cfc function to fetch this API details. For this called a "getStatus()" function through bind params. And able to load the cfprogress bar successfully. The problem is that I need to pass an en extra parameter to this getstatus function . Is it possible?
Please see the sample code I tried to load cfprogressbar
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<script type="text/javascript">
function startProgress() {
ColdFusion.ProgressBar.start("mydataProgressbar");
};
function onfinish() {
alert("Done");
};
</script>
<body>
<cfif IsDefined("Session.STATUS")>
<cfscript>
StructDelete(Session,"STATUS");
</cfscript>
</cfif>
<cfset sjsondata = '{"name":"Jibin","id":"1234"}'>
<!--- For code simplicity, formatting is minimal. --->
<cfform name="kitform">
<p>To make our service better and to benefit from our special offers,
take a moment to give us your email address and send us a comment.</p>
<p>Name:
<cfinput type="text" name="name"> </p>
<p>E-mail:
<cfinput type="text" name="email"> </p>
<p>Comment:
<cftextarea name="cmnt"/></p>
<p>
<cfoutput>
<cfinput type="hidden" name="jsondata" value="#sjsondata#">
</cfoutput>
<cfinput type="button" name="bttn1" value="Send Comment"
onClick=startProgress()></p>
<!--- The progressbar control --->
<cfinput type="button" name="bttn2" value="Send Comment 2"
onClick=startProgress2()></p>
<div style="padding-left:3px" >
<cfprogressbar name="mydataProgressbar"
bind="cfc:progressbar.getstatus({jsondata})"
interval="1700"
width="200"
oncomplete="onfinish"/>
</cfform>
</body>
</html>
File progressbar.cfc
<cfcomponent name="progressbar">
<cffunction name="getstatus" access="remote">
<cfargument name="jsonData" type="string" required="false">
<cfset str = StructNew()>
<cfset str.message = "Saving Data">
<cfif NOT IsDefined("session.STATUS")>
<cfset session.STATUS = 0.1>
<cfscript>
Sleep(200);
</cfscript>
<cfelseif session.STATUS LT 0.9>
<cfset session.STATUS=session.STATUS + .1>
<cfscript>
Sleep(200);
</cfscript>
<cfelse>
<cfset str.message = "Done...">
<cfset session.STATUS="1.0">
</cfif>
<cfset str.status = session.STATUS>
<cfreturn str>
</cffunction>
</cfcomponent>
Question 1: Is there a way to pass parameter to cfprogressbar getstatus() function?
Question 2: Is there any other alternative method to implement this process in progressbar.
Related
I'm basically wanting to do server side validation and then post the form data to a URL. My Google Foo is lacking as I haven't found any actual examples of doing this.
Here's what I have so far but maybe I'm going about it wrong.
<!doctype html>
<html lang="en">
<head>
<title>Untitled</title>
<script src="https://www.google.com/recaptcha/api.js" type="text/javascript"></script>
<script type="text/javascript">
var noRobot = function(response){
document.getElementById("sub").disabled = false;
}
</script>
</head>
<body>
<!-- Form Post -->
<CFIF CGI.Request_method IS "post">
<!-- Sends the recaptcha token to Google to verify -->
<cfinvoke component="/components/recaptcha" method="isRecaptchaGood" returnvariable="isGood">
<!-- Only post data if valid recapthca -->
<CFIF isGood>
<p>Good Recaptcha</p>
<!---
How do I foward on all the form data to the API?
// <cfhttpparam type="CGI" value="cgivar " name="mycgi">
// <cfhttp method="Post" url="http://myapi.com/api/users">
--->
<CFEXIT>
<CFELSE>
<p>Bad Recaptcha</p>
</CFIF>
</CFIF>
<CFOUTPUT>
<!---
I used to just post the data to the API, but now I first need to validate the recaptcha response on the server
<form action="http://myapi.com/api/users" method="post">
--->
<form action="#CGI.Script_Name#" method="post">
Name: <input type="text" name = "user" />
<CFIF Application.recaptcha.enabled>
<!--- A simple wrapper around generating the recaptcha div with the appropriate key --->
<cfinvoke component="/components/recaptcha" method="makeRecaptcha">
</CFIF>
<button type="submit" id="sub" name="con" disabled="disabled">Continue</button>
</form>
</CFOUTPUT>
</body>
</html>
As a disclaimer, I have about 6 hours of ColdFusion experience so I assume I'm missing something simple.
Form values edit:
<body>
<cfparam name="form.user" type="string" default="">
<cfparam name="form.amount" type="string" default="">
<form action="#CGI.Script_Name#" method="post">
User: <input type="text" name="user" value="#form.user#" />
Amount: <input type="number" name="amount" value="#form.amount#" />
</form>
</body>
Thanks to the help from #dan-bracuk and #Leigh, here's the working end result which might help someone else down the road:
<!doctype html>
<html lang="en">
<head>
<title>Untitled</title>
<script src="https://www.google.com/recaptcha/api.js" type="text/javascript"></script>
<script type="text/javascript">
<!--- The callback function recaptcha calls when the user has completed the step--->
<!--- Enable the Submit button--->
var recaptchaResponse = function(response){
document.getElementById("submit").disabled = false;
}
</script>
</head>
<body>
<!--- Declare default values for the form so if it fails validation the form can be redisplayed --->
<cfparam name="form.user" type="string" default="">
<cfparam name="form.amount" type="string" default="">
<!--- On Form Post --->
<CFIF CGI.Request_method IS "post">
<!--- Sends the recaptcha token to Google to verify --->
<cfinvoke component="components/recaptcha" method="isRecaptchaGood" returnvariable="isValid">
<!--- Only post data if valid recapthca --->
<CFIF isValid>
<p>Good Recaptcha</p>
<!--- Post the to API --->
<cfhttp method="Post" url="http://localhost:1249/api/users">
<!--- Send Form field values except for the recaptcha response --->
<cfloop list="#Form.FieldNames#" item="i">
<CFIF form[i] eq "G-RECAPTCHA-RESPONSE">
<cfcontinue />
<CFELSE>
<cfhttpparam type="formfield" name="#i#" value="#form[i]#">
</CFIF>
</cfloop>
</cfhttp>
<cflocation url="next.cfm">
<CFEXIT>
<CFELSE>
<!--- Recaptcha verification failed, redisplay the Form --->
<p>Bad Recaptcha</p>
</CFIF>
</CFIF>
<CFOUTPUT>
<!--- Post the Form back to itself first for server side validation --->
<form action="#CGI.Script_Name#" method="post">
User: <input type="text" name="user" value="#form.user#" />
Amount: <input type="number" name="amount" value="#form.amount#" />
<CFIF Application.recaptcha.enabled>
<!--- A simple wrapper around generating the recaptcha div with the appropriate key --->
<cfinvoke component="components/recaptcha" method="makeRecaptcha">
</CFIF>
<!--- Initially disable the continue button until the user completes the Recaptcha --->
<button type="submit" id="submit" disabled="disabled">Continue</button>
</form>
</CFOUTPUT>
</body>
</html>
I currently have a form which points to itself but more precisely, to an internal anchor for errors:
<form action="#errors" method="post">
...
</method>
When the form is submitted, I will validate incoming data and if errors are present output them on the screen (located inside the internal anchor). If the data is valid, I will redirect to a confirmation page:
<cflocation url="confirm.cfm" addToken="no" />
My problem is that the page redirected to still contains the reference to the internal anchor. The URL looks like this:
http://mydomain.com/confirm.cfm#errors
I've tried this with other languages and was able to replicate this functionality without the anchor remaining after having redirected.
Edit #1
This is on CF10, Windows 2008 R2.
Form page:
<cfif not structIsEmpty(form)>
<cfinvoke component="#request.cfcPath#.val" method="init" returnvariable="valObj"></cfinvoke>
<cfset valObj.validateGame()>
<cfif valObj.hasErrors()>
<cfoutput>#valObj.showErrors()#</cfoutput>
<cfelse>
<cfif form.editYN eq 0>
<cfinclude template="actInsert.cfm">
<cfelse>
<cfinclude template="actUpdate.cfm">
</cfif>
</cfif>
</cfif>
actUpdate.cfm
<!--- Redirect --->
<cfquery>...</cfquery>
...
<cflocation url="default.cfm?fuseaction=Confirm.gameUpdated" addtoken="No">
actInsert.cfm
<!--- Redirect --->
<cfquery>...</cfquery>
...
<cflocation url="default.cfm?fuseaction=Confirm.gameAdded" addtoken="No">
Edit #2
Here's a test case:
<!DOCTYPE html>
<head>
<title></title>
</head>
<body>
<cfif StructKeyExists(form, "doRedirect")>
<cfif form.doRedirect eq 1>
<cflocation url="http://stackoverflow.com" addtoken="false">
<cfelse>
<div id="errors">
<ul>
<li>Some error could have occured here.</li>
</ul>
</div>
</cfif>
</cfif>
<form action="#errors" method="post">
<div><label for="doRedirect">Do Redirect?</label><select name="doRedirect" id="doRedirect"><option value="0">No</option><option value="1">Yes</option></select></div>
<div><input type="submit" value="Go"/></div>
</form>
</body>
</html>
you can add a # value in the action part of the form.
Otherwise, you can do like:
<form action="" method="post">
<div><label for="doRedirect">Do Redirect?</label><select name="doRedirect" id="doRedirect"><option value="0">No</option><option value="1">Yes</option></select></div>
<div><input type="submit" value="Go"/></div>
</form>
I have a code that has been in the production environment for the past 2 years with no issues, last week our hosting company was down for two days, and when the server got back online, our application started having a particular issue.
This issue is when you try to login, it will bring you back to the login page with no errors.
I submitted a troble ticket and i was asked to clear my browser cache. I cleared my cache and the application started working again.
Is there no other way to resolve this issue without clearing the browser cache?
I have tried several method, I have used
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
and also used
<cflocation url="index.cfm" addtoken="yes">
Please see the code for Application.cfc
<cfcomponent>
<cfset this.name = "some_app">
<cfset this.applicationTimeout = createTimeSpan(0,9,0,0)>
<cfset this.clientmanagement= "yes">
<cfset this.ClientStorage = "registry"><!--- this was formally cookie, i changed it to registry, but no change --->
<cfset this.loginstorage = "session" >
<cfset this.sessionmanagement = "yes">
<cfset this.sessiontimeout = createTimeSpan(0,4,0,0)>
<cfset this.setClientCookies = "yes">
<cfset this.setDomainCookies = "yes">
<cfset this.scriptProtect = "all">
<cfset this.datasource = "some_dsn">
<cffunction name="onApplicationStart" output="false">
<cfset application.scriptProtect = "all">
<cfset application.sessions = 0>
<cfset application.surportmail = "support#some_app.com">
<cfset application.site.url = "http://some_app.com/"/>
<cfset application.com.Employee = CreateObject("component","com.user.Employee").init()/>
<cfset application.com.Appraisal = CreateObject("component","com.Appraisal").init()/>
<cfset application.com.Security = CreateObject("component","com.system.Login").init()/>
<cfset application.com.Log = CreateObject("component","com.adexfe.portal.system.Log").init()/>
<cfset application.com.Temp = CreateObject("component","com.adexfe.portal.Temp").init()/>
<cfset application.com.Util.Security = CreateObject("component","com.adexfe.util.Security").init()/>
<cfset application.com.Security.url = application.site.url/>
</cffunction>
<cffunction name="onApplicationEnd" output="false">
<cfargument name="applicationScope" required="true">
</cffunction>
<cffunction name="onRequestStart">
<cfargument name="requestname" required=true/>
<cflock type="exclusive" scope="session" timeout="10">
<cfparam name="session.IsLogin" default="false" type="boolean" />
<cfparam name="session.Userinfo" default="" />
</cflock>
<cflock type="readonly" scope="session" timeout="40">
<cfset request.IsLogin = session.IsLogin>
<cfset request.UserInfo = session.UserInfo>
</cflock>
<!--- Check for login here --->
<cfif Not request.IsLogin and ListLast(cgi.SCRIPT_NAME,'/') NEQ "login.cfm" and ListLast(cgi.SCRIPT_NAME,'/') NEQ "forget.cfm">
<cflocation url="login.cfm" addtoken="no">
</cfif>
<cfset application.com.Security.url = application.site.url/>
<cfset request.Security = application.com.Util.Security/>
<cfparam name="url.bp" default="#request.Security.URLEncrypt('bp=home')#"/>
<cfset url.bpr = url.bp/>
<cfif listfirst(url.bp,'=') eq 'h'>
<cfset request.aurl = request.Security.URLDecrypt(listlast(url.bp,'='))/>
<cfelse>
<cfset request.aurl.bp = url.bp/>
</cfif>
<cfset request.aurl.bp = Replace(request.aurl.bp,'.','/','all')>
</cffunction>
</cfcomponent>
Login.cfm code:
<html>
<head>
<title>Login</title>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link href="Assets/css/reset.css" rel="stylesheet" type="text/css" />
<link href="Assets/css/login.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td width="50%" align="right"><br /> <img src="Assets/img/logo-b.jpg" width="445" height="164" /></td>
<td><span class="label"> <img src="Assets/img/comp_logo.gif" vspace="100" hspace="50" /></span></td></tr>
</table>
<cfform name="login">
<table width="300" border="0" align="center" >
<tr><td nowrap class="label"> Email:</td>
<td><cfinput class="in" name="username" message="Valid email address is required please" type="text" required="yes" /></td></tr>
<tr><td height="41" class="label">Password:</td>
<td><cfinput class="in" name="Password" style="color:red;" required="yes" type="password"/></td></tr>
<tr><td height="41"> </td>
<td><input type="submit" value="Login" class="sub"/><input name="Captcha" value="" type="hidden"></td></tr>
<tr><td> </td>
<td>Forget password?</td></tr>
</table>
</cfform>
<cfoutput>
<cfif structkeyexists(form,'Captcha')>
<!---login with user info --->
<cfset s = createobject("component","com.system.Security").init(false,false)/>
<cfset l = createobject("component","com.system.Login").init()/>
<cfset l.url = application.site.url/>
<cfset l.SignIn(form,s)/>
<cfif Not l.IsLogin>
<div align="center" style="color:##F00; font-weight:bold; text-align:center;">#l.errmsg#</div>
<cfset application.com.Log.WriteLoginAttempt(form.username)/>
<cfelse>
<!--- set session --->
<cflock type="exclusive" scope="session" timeout="30" throwontimeout="yes">
<cfset session.IsLogin = true>
<cfset session.userInfo = application.com.Employee.GetEmployee(l.userInfo.employeeid)/>
</cflock>
<cfset application.com.Log.WriteLoginSuccess(form.username,l.userInfo.employeeId)/>
<cflocation url="index.cfm" addtoken="no">
</cfif>
</cfif>
</cfoutput>
</body>
</html>
Thank you
you can clear you application variables on the server if you use these commands, also you can use structClear() if you want to reset any of the variables and restart the application. Generally speaking once application variables are set they stay persistent in memory until the application is restarted.
these commands will restart the application.
<cfscript> applicationStop(); </cfscript> or <cfset applicationStop()>
after the variables have been cleared you can remove that line of code and that should resolve the caching issue.
The server that is hosting the code is running coldfusion 4.5. The page in question is a frameset, so I can't link directly to it.
It's this page: http://www.palosverdes.com/calendar/, and then the sign up link on the right under "Admin".
The code that is there right now works as expected for IE after allowing blocked content. Here's the code:
<cfscript>
CHALLENGE_URL = "http://api.recaptcha.net";
SSL_CHALLENGE_URL = "https://api-secure.recaptcha.net";
VERIFY_URL = "http://api-verify.recaptcha.net/verify";
</cfscript>
<cfif isDefined("form.recaptcha_challenge_field") and isDefined("form.recaptcha_response_field")>
<cftry>
<cfhttp url="#VERIFY_URL#" method="post" throwonerror="true">
<cfhttpparam type="formfield" name="privatekey" value="6LfwVs0SAAAAAIlIJpLDvIay_d5G0RncS0VSrnV0">
<cfhttpparam type="formfield" name="remoteip" value="#cgi.REMOTE_ADDR#">
<cfhttpparam type="formfield" name="challenge" value="#form.recaptcha_challenge_field#">
<cfhttpparam type="formfield" name="response" value="#form.recaptcha_response_field#">
</cfhttp>
<cfcatch>
<cfthrow type="RECAPTCHA_NO_SERVICE"
message="recaptcha: unable to contact recaptcha verification service on url '#VERIFY_URL#'">
</cfcatch>
</cftry>
<cfset aResponse = listToArray(cfhttp.fileContent, chr(10))>
<cfset form.recaptcha = aResponse[1]>
<cfset structDelete(form, "recaptcha_challenge_field")>
<cfset structDelete(form, "recaptcha_response_field")>
<cfif aResponse[1] eq "false" and aResponse[2] neq "incorrect-captcha-sol">
<cfthrow type="RECAPTCHA_VERIFICATION_FAILURE"
message="recaptcha: the verification service responded with error '#aResponse[2]#'. See http://recaptcha.net/apidocs/captcha/ for error meanings.">
</cfif>
<cfelse>
<cfset form.recaptcha = false>
</cfif>
<cfif isdefined("form.recaptcha") and form.recaptcha neq "false">
<cfinclude template="addorgresults.cfm">
<cfelse>
I've used this page http://www.palosverdes.com/sandbox/captchatest.cfm to determine that the captcha itself is working correctly, so my guess is that it has something to do with putting the captcha in a frameset. Any ideas?
The reason it isn't working in Firefox:
api-secure.recaptcha.net uses an invalid security certificate.
The certificate is only valid for www.google.com
(Error code: ssl_error_bad_cert_domain)
You appear to be using 2 different sets of code for your test one (that works) and the one that doesn't work.
The one that is broken:
<script type="text/javascript"
src="https://api-secure.recaptcha.net/challenge?k=6LfwVs0SAAAAAClnUJ5XD7O19d9ZdlGBFgAn8Gws">
</script>
<noscript>
<iframe src="https://api-secure.recaptcha.net/noscript?k=6LfwVs0SAAAAAClnUJ5XD7O19d9ZdlGBFgAn8Gws"
height="300" width="500" frameborder="0"></iframe><br>
<textarea name="recaptcha_challenge_field" rows="3" cols="40">
</textarea>
<input type="hidden" name="recaptcha_response_field"
value="manual_challenge">
</noscript>
The one that works:
<script type="text/javascript"
src="http://www.google.com/recaptcha/api/challenge?k=6LfwVs0SAAAAAClnUJ5XD7O19d9ZdlGBFgAn8Gws">
</script>
<noscript>
<iframe src="http://www.google.com/recaptcha/api/noscript?k=6LfwVs0SAAAAAClnUJ5XD7O19d9ZdlGBFgAn8Gws"
height="300" width="500" frameborder="0"></iframe><br>
<textarea name="recaptcha_challenge_field" rows="3" cols="40">
</textarea>
<input type="hidden" name="recaptcha_response_field"
value="manual_challenge">
</noscript>
I think you need to change the URL's on the first one from api-secure.recaptcha.net to google.com/recaptcha/api
I signed up for reCaptcha, got my private/public keys, made my recaptcha.cfm and put the code in my form. The form renders perfectly when you go to the URL but it submits even when the person doesn't put anything in the captcha. This is the code for my recaptcha.cfm and I have the relevant code for the form page commented out in recaptcha.cfm under "Sample." Any help would be greatly appreciated. Thank you.
<cfsetting enablecfoutputonly="true">
<!---
Use the reCAPTCHA API to verify human input.
reCAPTCHA improves the process of digitizing books by sending words that
cannot be read by computers to the Web in the form of CAPTCHAs for
humans to decipher. More specifically, each word that cannot be read
correctly by OCR is placed on an image and used as a CAPTCHA. This is
possible because most OCR programs alert you when a word cannot be read
correctly.
You will need a key pair from http://recaptcha.net/api/getkey to use this tag.
Sample
--------------------------------
<html>
<body>
<cfform>
<cf_recaptcha
privateKey="6LepjdQSAAAAAMspsO04gZUXltxddkiI0ZgSF02h"
publicKey="6LepjdQSAAAAADoLvfvgkwacBAI_GbL-nTy2zvS6">
<cfinput type="submit" name="submit">
</cfform>
<cfif isDefined("form.submit")>
<cfoutput>recaptcha says #form.recaptcha#</cfoutput>
</cfif>
</body>
</html>
--->
<cfscript>
CHALLENGE_URL = "http://api.recaptcha.net";
SSL_CHALLENGE_URL = "https://api-secure.recaptcha.net";
VERIFY_URL = "http://api-verify.recaptcha.net/verify";
</cfscript>
<cfif not structKeyExists(attributes, "publicKey")>
<cfthrow type="RECAPTCHA_ATTRIBUTE"
message="recaptcha: required attribute 'publicKey' is missing">
</cfif>
<cfif not structKeyExists(attributes, "privateKey")>
<cfthrow type="RECAPTCHA_ATTRIBUTE"
message="recaptcha: required attribute 'privateKey' is missing">
</cfif>
<cftry>
<cfparam name="attributes.action" default="render">
<cfif not listContains("render,check", attributes.action)>
<cfset sInvalidAttr="action not render|check">
<cfthrow>
</cfif>
<cfset sInvalidAttr="ssl not true|false">
<cfparam name="attributes.ssl" type="boolean" default="false">
<cfparam name="attributes.theme" type="regex" pattern="(red|white|blackglass)" default="red">
<cfif not listContains("red,white,blackglass", attributes.theme)>
<cfset sInvalidAttr="theme not red|white|blackglass">
<cfthrow>
</cfif>
<cfset sInvalidAttr="tabIndex not numeric">
<cfparam name="attributes.tabIndex" type="numeric" default="0">
<cfcatch type="any">
<cfthrow type="RECAPTCHA_ATTRIBUTE"
message="recaptcha: attribute #sInvalidAttr#">
</cfcatch>
</cftry>
<cfif isDefined("form.recaptcha_challenge_field") and isDefined("form.recaptcha_response_field")>
<cftry>
<cfhttp url="#VERIFY_URL#" method="post" timeout="5" throwonerror="true">
<cfhttpparam type="formfield" name="privatekey" value="#attributes.privateKey#">
<cfhttpparam type="formfield" name="remoteip" value="#cgi.REMOTE_ADDR#">
<cfhttpparam type="formfield" name="challenge" value="#form.recaptcha_challenge_field#">
<cfhttpparam type="formfield" name="response" value="#form.recaptcha_response_field#">
</cfhttp>
<cfcatch>
<cfthrow type="RECAPTCHA_NO_SERVICE"
message="recaptcha: unable to contact recaptcha verification service on url '#VERIFY_URL#'">
</cfcatch>
</cftry>
<cfset aResponse = listToArray(cfhttp.fileContent, chr(10))>
<cfset form.recaptcha = aResponse[1]>
<cfset structDelete(form, "recaptcha_challenge_field")>
<cfset structDelete(form, "recaptcha_response_field")>
<cfif aResponse[1] eq "false" and aResponse[2] neq "incorrect-captcha-sol">
<cfthrow type="RECAPTCHA_VERIFICATION_FAILURE"
message="recaptcha: the verification service responded with error '#aResponse[2]#'. See http://recaptcha.net/apidocs/captcha/ for error meanings.">
</cfif>
<cfelse>
<cfset form.recaptcha = false>
</cfif>
<cfif attributes.action eq "render">
<cfif attributes.ssl>
<cfset challengeURL = SSL_CHALLENGE_URL>
<cfelse>
<cfset challengeURL = CHALLENGE_URL>
</cfif>
<cfoutput>
<script type="text/javascript">
<!--
var RecaptchaOptions = {
theme : '#attributes.theme#',
tabindex : #attributes.tabIndex#
};
//-->
</script>
<script type="text/javascript"
src="#challengeURL#/challenge?k=#attributes.publicKey#">
</script>
<noscript>
<iframe src="#challengeURL#/noscript?k=#attributes.publicKey#"
height="300" width="500" frameborder="0"></iframe><br>
<textarea name="recaptcha_challenge_field" rows="3" cols="40">
</textarea>
<input type="hidden" name="recaptcha_response_field"
value="manual_challenge">
</noscript>
</cfoutput>
</cfif>
<cfsetting enablecfoutputonly="false">
That custom tag is badly out of date. You need to update the URLs because Google changed them. Change them to this:
CHALLENGE_URL = "http://www.google.com/recaptcha/api";
SSL_CHALLENGE_URL = "https://www.google.com/recaptcha/api";
VERIFY_URL = "http://www.google.com/recaptcha/api/verify";
I have posted an updated version of this custom tag as a Gist here: https://gist.github.com/2210356