coldfusion

Decode Numeric HTML Entities in ColdFusion?

▼魔方 西西 提交于 2020-02-10 03:33:04
问题 I need a way to transform numeric HTML entities into their plain-text character equivalent. For example, I would like to turn the entity: é into the character: é Through some googling around I found a function called HtmlUnEditFormat, but this function only transforms named entities. Is there a way to decode numeric entities in ColdFusion? 回答1: Updated Answer: Thanks to Todd Sharp for pointing out a very simple way to do this, using the Apache Commons StringEscapeUtils library, which is

Enable/disable submit button with jQuery and Coldfusion server code

拟墨画扇 提交于 2020-02-05 09:57:49
问题 I am trying to enable/disable a submit button with jQuery in my code. Right now, everything works out, until I submit the form, it goes through the server-side validation and fails, this sends me to an error page with a back button, when I click on the back button I got back to the form page and the button is still disabled. Any thoughts? Code: <input type="submit" value="Submit" id="SubmitBtn" name="SubmitBtn"> <script type="text/javascript" language="javascript"> if(typeof window.submitForm

Enable/disable submit button with jQuery and Coldfusion server code

六月ゝ 毕业季﹏ 提交于 2020-02-05 09:57:48
问题 I am trying to enable/disable a submit button with jQuery in my code. Right now, everything works out, until I submit the form, it goes through the server-side validation and fails, this sends me to an error page with a back button, when I click on the back button I got back to the form page and the button is still disabled. Any thoughts? Code: <input type="submit" value="Submit" id="SubmitBtn" name="SubmitBtn"> <script type="text/javascript" language="javascript"> if(typeof window.submitForm

How can I get ColdFusion methods to return numeric values as strings in JSON format?

别等时光非礼了梦想. 提交于 2020-02-05 08:19:33
问题 ColdFusion 8 This is as simple pseudo-code as there can be: <cffunction name="badJSON" access="remote" output="true" returntype="string" returnformat="JSON"> <cfreturn "06762" /> </cffunction> Results in: 6762.0 It should result in: 06762 Is there a way to get JSON to not convert my value to numeric? I know I can use WDDX, but that is out of the question. 回答1: Have you tried this? return javaCast("string", "06762") 回答2: Ok, so there is no real way to do this in CF8. The workaround is to add a

Consuming a SAML 2.0 assertion with ColdFusion - What do I do with a public key (.pem) file?

别等时光非礼了梦想. 提交于 2020-02-03 09:27:26
问题 I am tasked with getting our ColdFusion 9 app to receive a SAML assertion for single sign-on. We are the service provider. Thus far, I have used the only real source of information about ColdFusion and SAML at the following URL for guidance: http://blog.tagworldwide.com/?p=19 I have a sample SAML XML assertion from the identity provider and it looks very similar to the following example from Salesforce.com. <samlp:Response ID="_257f9d9e9fa14962c0803903a6ccad931245264310738" IssueInstant="2009

Reproducible CFQUERYPARAM performance issue in Coldfusion 10

 ̄綄美尐妖づ 提交于 2020-02-03 04:55:21
问题 I've consistently been able to reproduce a serious parameterization performance issue with Coldfusion 10 querying SQL Server 2008 R2 and would be interested to know what others get. The code is below. What does the test do? It creates a table with 100 rows. A data column is blank in all but one. It then runs a Coldfusion query 10 times, half using cfqueryparam and half using a simple string. It returns a list with the response time for each. When I run this, apart from the initial calls, the

C# equivalent to this ColdFusion Decrypt function

天大地大妈咪最大 提交于 2020-02-02 10:18:48
问题 I have a function in ColdFusion that encrypts and decrypts passwords. I need someone to look at the function and point me to or write me a c# equivalent. It is needed for a project asap so I can throw you some cash through paypal if you can help. CF function: Decrypt("CLbtkjNkcofJ5D8s4Ri7nA==", "EajmplPP8DHg6Tqq8BVRMw==", "AES", "Base64") This is the real function, with real data from a test side, that needs to be converted. Any help would be awesome .. and profitable. Thanks, Donnie 回答1:

White Space / Coldfusion

孤街醉人 提交于 2020-02-01 10:58:11
问题 What would be the correct way to stop the white space that ColdFusion outputs? I know there is cfcontent and cfsetting enableCFoutputOnly . What is the correct way to do that? 回答1: In addition to <cfsilent> , <cfsetting enablecfoutputonly="yes"> and <cfprocessingdirective suppressWhiteSpace = "true"> is <cfcontent reset="true" /> . You can delete whitespaces at the beginning of your document with it. HTML5 document would then start like this: <cfcontent type="text/html; charset=utf-8" reset=

group by cities

梦想的初衷 提交于 2020-01-30 11:58:06
问题 As I was advised by a good man and programmer I should simplify my table. So far I have made a new table (x-month,y-cities,value-Nettotal) it works, but still I didn't understand why it can't group the values (nettotal) by cities. It's OK with month, but the values just come starting from left to right without any 0 left behind. Anyway I hope you will understand everything from the source: here are the queries: <cfquery name="GET_SALES_TOTAL" datasource="#dsn#"> SELECT SUM(COALESCE(nettotal,0

group by cities

被刻印的时光 ゝ 提交于 2020-01-30 11:57:53
问题 As I was advised by a good man and programmer I should simplify my table. So far I have made a new table (x-month,y-cities,value-Nettotal) it works, but still I didn't understand why it can't group the values (nettotal) by cities. It's OK with month, but the values just come starting from left to right without any 0 left behind. Anyway I hope you will understand everything from the source: here are the queries: <cfquery name="GET_SALES_TOTAL" datasource="#dsn#"> SELECT SUM(COALESCE(nettotal,0