coldfusion

Can I access ColdFusion session inside JQuery?

我怕爱的太早我们不能终老 提交于 2019-12-24 13:56:02
问题 I have a ColdFusion page for login. The click of the login button is being handled by a JQuery function. The authentication itself is fake and is happening inside the function itself. Once that is successful, I load contents from another ColdFusion page into the first page. Can I, in any way, set a variable in the ColdFusion session from JQuery? 回答1: in the strictest sense of the question, no, jQuery/javaScript can't access ColdFusion variables directly, Kevin B is correct. However, you can

cfpdf merge error when trying to merge multiple pdf files

纵然是瞬间 提交于 2019-12-24 13:52:52
问题 I'm using CFPDF to merge multiple PDFs together. The PDFs were created using wkhtmltopdf 0.12.1. In most cases the code works fine, but 2 of my documents error whenever merged together. My online searches came up empty and I'm really at a loss. Any help is greatly appreciated. <cfpdf action="merge" destination="#outputFile#" overwrite="yes"> <cfloop index="i" from="1" to="#arrayLen(pdfFiles)#"> <cfpdfparam source="#pdfFiles[i]#"> </cfloop> </cfpdf> The error occurs on line 173 <cfpdfparam

Decimal numbers in a HTML cfgridcolumn

给你一囗甜甜゛ 提交于 2019-12-24 12:04:59
问题 For some reason all my cfgrids drop the ending 0 of dollar amounts. So 104.50 is coming up as 104.5 and 332.80 is coming up as 332.8 It displays the last digit if it is not a 0. So 345.43 is fine. I have tried using the currency type but that only works with flash grids. This seems like an easy problem but I am stuck and everything I am trying is not working. Any help on this would be great. Thanks! 回答1: This is for CF9 (ExtJS 3.x). <cfsavecontent variable="formatGridInit"> <script language=

Generate pdf from current document

浪子不回头ぞ 提交于 2019-12-24 11:50:10
问题 I need a way to dynamicly generate a pdf from the currently opened coldfusion document. But I don't have an idea how to handle this because I didn't find a way i.e. to pass the current (html) text to a function which generates the pdf by using the cfdocument tag. Any hints or ideas, how to solve this problem? 回答1: Rather than capture the current response body, you could use the "src" attribute of cfdocument to request the current page via an internal self-referencing request. within

Struckt Key Exists in cfqueryparam?

送分小仙女□ 提交于 2019-12-24 11:37:14
问题 I have form fields with checkbox fields. On my cfc page I would like to use strucktKeyExists to check if checkbox form fields exist when I run my Insert/Update query. Also I have null attribute in my cfqueryparam that will set value to true/false if value/field doesn't exist. Here is example of my code: dm_ck0 = <cfqueryparam value="#trim(structKeyExists(FORM, 'frm_ck0'))#" cfsqltype="cf_sql_bit" maxlength="1" null="#yesNoFormat(!len(trim(structKeyExists(FORM, 'frm_ck0'))))#" /> So when I

Different results with cfstoredproc and cfquery

老子叫甜甜 提交于 2019-12-24 11:34:06
问题 When I execute a stored proc via cfstoredproc , I am getting a different result than calling that stored proc via cfquery . I am passing in the same exact parameter values to each call. And also, when I run the stored proc in SQL Studio, I get the correct results (same as the cfquery). Here's the cfstoredproc call <cfstoredproc datasource="#request.mainDSN#" debug="#request.debug#" procedure="rankingresults"> <cfprocparam type="in" value="8652" CFSQLType="CF_SQL_INTEGER"> <cfprocparam type=

CFML and Exchange - CFexchange tags have stopped working

爷,独闯天下 提交于 2019-12-24 11:27:08
问题 I need a little hand holding to convert my CFML cfexchange tags to the EWS API. I'm using CF 9.0.1 and need to add mail/calendar items to a hosted Exchange server. I get the following error: Error: Could not log in to the Exchange server. ________________________________________ connection="exchangeConn" server="EXVMBX016-5.exch016.msoutlookonline.net" username="exch016\j_ttt" mailboxname="j@ttt.com" password="[removed]" Protocol="http" port="80" formbasedauthentication="TRUE"

How to Add a link to a PDF with ColdFusion and iText

醉酒当歌 提交于 2019-12-24 11:25:12
问题 I used this technique to insert an image Adding a dynamic image to a PDF using ColdFusion and iText Now, I need to insert a link to a external URL at X/Y and text inside with itext and ColdFusion. Can someone help me do this? Thanks. 回答1: Here is rough example that works with CF9. There are probably more elegant methods, but this should give you the basic idea. Note - IIRC CF8 uses an earlier version of iText (1.4). CF9 uses 2.1.0. So I am relatively certain it will not run "as is" with CF8.

Generating a total within a query loop

≡放荡痞女 提交于 2019-12-24 10:48:37
问题 I have a simple query that pulls a list of records by their ID: <cfquery name="resTotals" datasource="#datasource#"> SELECT ticket_id FROM closed_tickets WHERE YEAR(closed_date) = '2017' AND ticket_type = 'residential' </cfquery> I am then trying to loop through those ID's in another query of a different table so I can check for the existence of a payment record. The goal is to then total up all the payment records find to get a total amount in dollar of payments. I have this query to do that

Changing cfform values with javascript for dynamic bind output

别等时光非礼了梦想. 提交于 2019-12-24 10:48:36
问题 CFM <html> <head> <title>Test Page</title> <script type="text/javascript"> function toggleV(value){ document.getElementById('blah').value = value; } </script> </head> <body> <cfform name="coolfrm"> <cfinput type="hidden" name="blah" id="blah" value="default"> <a onclick="toggleV('anothervalue')" style="cursor:pointer;">click Me</a> </cfform> <cfdiv bind="cfc:TestCFC.func({coolfrm:blah})"></cfdiv> </body> </html> CFC <cfcomponent> <cfscript> remote function func(simpleString){ return