coldfusion

Scope of var and variables

余生长醉 提交于 2020-01-24 06:16:52
问题 If I have a function like <cfscript> function say(what) { var a = what; variables.b = what; return what; } </cfscript> I thought the scope of a was variables , but dumping variables returns just b . What is the scope of a? 回答1: Declaring a variable using the var keyword puts it into the local scope, not the variables scope. 回答2: This really is a comment, but it is way too long. Consider the following code <cfscript> function doMath() { var a = 1; local.b = 2; return a + local.b; } </cfscript>

Scope of var and variables

半城伤御伤魂 提交于 2020-01-24 06:16:29
问题 If I have a function like <cfscript> function say(what) { var a = what; variables.b = what; return what; } </cfscript> I thought the scope of a was variables , but dumping variables returns just b . What is the scope of a? 回答1: Declaring a variable using the var keyword puts it into the local scope, not the variables scope. 回答2: This really is a comment, but it is way too long. Consider the following code <cfscript> function doMath() { var a = 1; local.b = 2; return a + local.b; } </cfscript>

reCaptcha v3 with ColdFusion

南楼画角 提交于 2020-01-24 04:29:25
问题 I'm trying to integrate reCaptcha (v3) to a ColdFusion site. I'm not too hot on the CF syntax and currently I'm seemingly getting nothing back from the verify request on the server side. Can anyone see anything obviously wrong and/or point me in the right direction please? Client Side: <script src='https://www.google.com/recaptcha/api.js?render=6..."></script> <script> grecaptcha.ready(function() { grecaptcha.execute('6...', {action: 'contact'}) .then(function(token) { $("#recaptchaToken")

How can I prevent page-break in CFDocument from occuring in middle of content?

不羁的心 提交于 2020-01-24 03:25:14
问题 I am generating a PDF file dynamically from html/css using the cfdocument tag. There are blocks of content that I don't want to span multiple pages. After some searching I found that the style "page-break-inside" is supported according to the docs. However in my testing the declaration "page-break-inside: avoid" does no good. Any suggestions on getting this style declaration to work, or have alternative suggestions? Here is an example. I would expect the content in the div tag not to span a

Mailchimp API login returning “bad request”

风流意气都作罢 提交于 2020-01-23 16:27:26
问题 I am trying to sign in, using the mailchimp api, but I am getting StatusCode "400 Bad Request". How can I solve this error? index.cfm <cfform action="https://login.mailchimp.com/oauth2/authorize?response_type=code&client_id=462880470696&redirect_uri=http://127.0.0.1:8500/mailchimp/callback.cfm" method="post"> Click Submit Button <cfinput type="Submit" name="SubmitForm" value="Submit"> callback.cfm <cfoutput>#URL.code#</cfoutput> <cfhttp url="https://login.mailchimp.com/oauth2/token" method=

Mailchimp API login returning “bad request”

北城余情 提交于 2020-01-23 16:27:05
问题 I am trying to sign in, using the mailchimp api, but I am getting StatusCode "400 Bad Request". How can I solve this error? index.cfm <cfform action="https://login.mailchimp.com/oauth2/authorize?response_type=code&client_id=462880470696&redirect_uri=http://127.0.0.1:8500/mailchimp/callback.cfm" method="post"> Click Submit Button <cfinput type="Submit" name="SubmitForm" value="Submit"> callback.cfm <cfoutput>#URL.code#</cfoutput> <cfhttp url="https://login.mailchimp.com/oauth2/token" method=

How do I fix SpreadSheetAddRows function crashing when adding a large query?

守給你的承諾、 提交于 2020-01-22 19:40:33
问题 EDIT3: Thanks to the help of @Leigh I've narrowed down the problem to the date columns in the query. Using the original code set and POI, the page crashes when SpreadSheetAddRows() attempts to add a very large query that contains date-like cells. I've made a bug report here: https://bugbase.adobe.com/index.cfm?event=bug&id=3432184. I have a query that I am adding to a spreadhseet object that seems to error when the query has an unweildly amount of rows (18583 in this example). The exact error

How do I fix SpreadSheetAddRows function crashing when adding a large query?

99封情书 提交于 2020-01-22 19:39:47
问题 EDIT3: Thanks to the help of @Leigh I've narrowed down the problem to the date columns in the query. Using the original code set and POI, the page crashes when SpreadSheetAddRows() attempts to add a very large query that contains date-like cells. I've made a bug report here: https://bugbase.adobe.com/index.cfm?event=bug&id=3432184. I have a query that I am adding to a spreadhseet object that seems to error when the query has an unweildly amount of rows (18583 in this example). The exact error

Parse a specific variable from a url stored as a string with CFML

╄→尐↘猪︶ㄣ 提交于 2020-01-20 06:59:11
问题 I want to parse a specific url variable key value from a url stored as a string. It seems that you can use the underlying java library coldfusion.util.HTMLTools under ACF, but I need it to work under Railo as well. Is there another way, or is using a regular expression the best answer? I'm trying to retrieve the value of the url variable key without the anchor in a url formatted like the following example. http://example.com?key=134324625625435#gid=0 回答1: I was posting as a comment on Scott's

ColdFusion CFHTTP I/O Exception: peer not authenticated - even after adding certs to Keystore

淺唱寂寞╮ 提交于 2020-01-20 05:59:24
问题 I'm currently working with a payment processor. I can browse to the payment URL from our server, so it's not a firewall issue, but when I try to use CFHTTP I get a I/O Exception: peer not authenticated. I've downloaded and installed their latest security cert into cacerts keystore and restarted CF and am still getting the same error. Not only have I installed the providers cert, but also the 2 other Verisign certificate authority certs in the certificate chain. The cert is one of the newer