coldfusion

Correct Parameters to pass to Encrypt AES in Coldfusion 8 (or 10)

时光总嘲笑我的痴心妄想 提交于 2020-01-15 06:11:31
问题 So I have (this doesn’t work b/c hex is probably wrong and the key and the IV are not converted correctly): (aesKey and aesIV are provided as hex strings from Third Party) They look something like this (not the same but should be enough to work with I replaced some values in the keys so they aren’t exactly the same: <cfparam name="aesKey" default="C20648780E8843795325F3BA5EC43183C8BFA2D26B5470BC309ED5BA6B142EFA"/> <cfparam name="aesIV" default="A53F0A6E6972A0095CFFDBE4F47C3CF8"/> <cfset token

ColdFusion10 CFDocument debug output

我的梦境 提交于 2020-01-15 06:06:35
问题 Is there a way to capture the complete HTML code from CFDocument before it generates the actual Document/PDF (for debugging)? The tag itself doesn't seem to support it. What works partially is storing the separate parts of the HTML via cfsavecontent but I can't capture the whole thing at once: <cfsavecontent variable="test123"> <style type="text/css" media="screen"> <!-- Style based on paperSize--> <cfoutput> #request.paperSize.css# </cfoutput> </style> </cfsavecontent> <cfdump var="#test123#

ColdFusion10 CFDocument debug output

試著忘記壹切 提交于 2020-01-15 06:05:30
问题 Is there a way to capture the complete HTML code from CFDocument before it generates the actual Document/PDF (for debugging)? The tag itself doesn't seem to support it. What works partially is storing the separate parts of the HTML via cfsavecontent but I can't capture the whole thing at once: <cfsavecontent variable="test123"> <style type="text/css" media="screen"> <!-- Style based on paperSize--> <cfoutput> #request.paperSize.css# </cfoutput> </style> </cfsavecontent> <cfdump var="#test123#

conditions for accessors in Coldfusion ORM

回眸只為那壹抹淺笑 提交于 2020-01-15 05:21:06
问题 Once you have loaded a component are you then able to access properties of that object with set conditions? For instance, if you have a one-to-many relationship between people and pets, you load people specifying a particular person, you then want to pull all said persons pets where the pets are of a particular species. cats vs dogs for instance. <cfset person=EntityLoad("person", {name="#URL.name#"})> <cfset pets=person[1].getPets()> is there anyway to call getPets where type='dog' or

Sending cf mail from a static page to single recipient

会有一股神秘感。 提交于 2020-01-15 05:16:28
问题 Trying to send <cfmail> from a contact us static page. It will have a single recipient and I don't want to save it on the back end. <cfcase value="contact"> <cfset caller.mainTitle = "Contact Us"> <div id="contact_form"> <cfform method="post" action="contact2" id="usrform"> First Name<br> <input class="textbox" type="text" name="firstName" value="First Name" onfocus="if (this.value=='First Name') this.value='';"> <br> Last Name<br> <input class="textbox" type="text" name="lastName" value=

Google oauth token giving 405 error

让人想犯罪 __ 提交于 2020-01-15 04:27:21
问题 I am trying to post using below Code. I expect it to return token but its returning error 405 Method Not Allowed . <cfhttp method="POST" url="http://accounts.google.com/o/oauth2/token" > <cfhttpparam type="Formfield" name="code" value="#url.CODE#"> <cfhttpparam type="Formfield" name="client_id" value="458381219741.apps.googleusercontent.com"> <cfhttpparam type="Formfield" name="client_secret" value="XXXXXXX"> <cfhttpparam type="Formfield" name="redirect_uri" value="http://console.mbwebportal

Paginating with Coldfusion

跟風遠走 提交于 2020-01-15 03:51:13
问题 Is it possible to paginate and display number of pages in Coldfusion using only one query? My understanding is you can obviously paginate with one query, but you would need an additional query to create the pages. This is in order to calculate the total number of results. (currentPage - 1) * resultsPerPage = Offset in MySQL query. This logic is sufficient to create next/prev buttons. But in order to know the number of pages, would we not need to know the total number of results using a

When I try to execute the stored procedure in ColdFusion, then not all of the information is returned

心不动则不痛 提交于 2020-01-15 03:41:20
问题 When I try to execute the stored procedure in ColdFusion, then not all of the information is returned. I'm running ColdFusion 9.0.1 w/ Hot Fix 2. I'm working with SQL Server 2008 r2. I'm limited to stored procedure calls. I can execute a stored procedure in SQL Server Management Studio to return a single record either in as a variable or as a select statement. The complete record is returned. The data stored in the database is 36539 characters long. The data returned by ColdFusion from a

ColdFusion , REGEX - Given TEXT, find all items contained in SPANs

假装没事ソ 提交于 2020-01-15 03:13:47
问题 I'm looking to learn how to create a REGEX in Coldfusion that will scan through a large item of html text and create a list of items. The items I want are contained between the following <span class="findme">The Goods</span> Thanks for any tips to get this going. 回答1: You don't say what version of CF. Since v8 you can use REMatch to get an array results = REMatch('(?i)<span[^>]+class="findme"[^>]*>(.+?)</span>', text) Use ArrayToList to turn that into a list. For older version use

Get newly inserted record ID in CFScript

戏子无情 提交于 2020-01-14 19:21:09
问题 I have some code that inserts a record into the log along with the request information. Once the request is sent and a response is sent back I update the record with the response info. Is there a way to get the ID of the newly inserted record so I can reference that and update it once I receive the response? I know using CF tags you can use SET NO COUNT but it doesn't seem to work in CFScript. Seems like nothing is returned in an INSERT statement. query = new query(); query.name =