We help IT Professionals succeed at work.

ColdFusion Language





ColdFusion is a server-side rapid application development platform originally created by Allaire and now sold by Adobe, implementing the dynamic general purpose CFML programming language. The term ColdFusion is sometimes colloquially used to refer to the CFML language (Cold Fusion Markup Language), but can also include discussions of the server software implementation. ColdFusion runs using a customised version of Apache Tomcat. Earlier versions are bundled with JRun.

I'm trying to process a form submission where there are 3 fields with different names, but 10 instances of the fields. I know it sends the duplicate fields as a delimited list.

My issue is that I'm using the CFLOOP to create 3 variables each iteration, each with a concatenated index value. So my output from the cfloop gives me these variables.
<cfset var1=1>
<cfset var2=6>
<cfset var3=15>

<cfset newvar1=16>
<cfset newvar2=89>
<cfset newvar3=82>

<cfset anothervar1=7>
<cfset anothervar2=9>
<cfset anothervar3=11>

So I have 3 different cfloops doing the same thing. Now, I am ready to insert these variables into a database using the same CFLOOP idea

<cfloop index="x" from="1" to="10">
<cfquery name="addreco" datasource="#mydsn#">
INSERT INTO myDatabase
VALUES (foo,foobar,foofoo)


Is the data inserting formatted right since I'm technically combining two variable names to create a single variable name?  I've read multiple examples online for ways to do this and have only been confused by the proper syntax. I have not yet tested this theoretical format to make the data work.

I have researched the web for examples and can't find one in Coldfusion.

I have an HTML form with dynamically generated fields with checkbox values. I want to be able to click any combination of checkboxes and have a visual tally showing the sum value of the checked boxes. This will allow the user to know the calculated total of the check boxes as they click on them. The TOTAL value field does not need to be submitted necessarily as a form field, but can be.


[ ] Checkbox 1 (value=1)
[ ] Checkbox 2 (value=2)
[ ] Checkbox 3 (value=1)

If the user clicks boxes 1 and 3, I want a visual real-time display of the total of those two fields as "2".

Please provide working HTML code and Javascript as I suppose would be needed.
I have a sql query w/in Cold Fusion I'm confused about. The colorization of the commented out code isn't showing correctly within dreamweaver:

[code][/<cfquery name="vp" datasource="casprod">
select c.org_id orgid, c.vendor_name vendor, c.address_line1 addr1, c.address_line2 addr2, c.address_line3 addr3,c.city city,c.state state, substr(c.zip,1,5) zip, c.country country, substr(d.attribute1,1,2) doctype, sum(d.amount) tot_amount, count(distinct c.check_id) count
from ap.ap_checks_all c, ap.ap_invoice_payments_all p, ap.ap_invoice_distributions_all d, ap.ap_invoices_all i
where  c.payment_method_lookup_code='CHECK'
and c.amount <> 0
and c.check_id = p.check_id
and p.invoice_id= d.invoice_id
and d.invoice_id = i.invoice_id
and c.status_lookup_code = 'NEGOTIABLE'
and c.org_id =101
and i.source <> 'MILITARY PAY'
and c.check_date >= TRUNC(ADD_MONTHS(SYSDATE, -1),'MM')
and c.check_date <= LAST_DAY(ADD_MONTHS(SYSDATE, -1))
group by c.org_id,c.attribute8,c.vendor_name,c.address_line1,c.address_line2, c.address_line3,c.city,c.state,c.zip,c.country,substr(d.attribute1,1,2)
order by 3

<!---select c.org_id orgid, c.attribute8 attrib8, c.vendor_name vendor, c.address_line1 addr1, c.address_line2 addr2, c.address_line3 addr3,c.city city,c.state state, substr(c.zip,1,5) zip, c.country country, substr(d.attribute1,1,2) doctype, sum(d.amount) tot_amount, count(distinct c.check_id) count
from ap.ap_checks_all c, ap.ap_invoice_payments_all p, ap.ap_invoice_distributions_all…
I need to pass params to the coldfusion cfc using Bootstrap table toolbar.

When I click the apply button I am serializing the form into array and now I need to split the variable. I have the code bu I get the  error message Uncaught SyntaxError: missing ) after argument list

			var vals  = $("#frm2").serializeArray();
			var str  = "";
			for (i=0; i<vals.length;i++){
   				str += '&' + $('#' + i.name) + '_title=' + $('#' + i.name').attr('title') + '&' + $('##' + i.name) + '_alt=' + $('##' + i.name').attr('alt');
			$('#classes').bootstrapTable('refresh',{query: {str}});
			return false;

Open in new window

online credit application formHi,

 i have cold fusion web page (.cfm) where potential customers fills out credit application information and submit to us.At this point, anyone can poke around and can stumble upon this .cfm page and fill out the information and submit to us.

 However, due to no protection or verification process in place, we are getting one too many prank/fake applications and I like to do something about it.

 I  have seen examples of protection like requiring the result of multiplication of two numbers:   2 x 3 = 6 or the picture where I am supposed to select blocks in the picture where cars are seen ... etc.

What is the simplest and easiest way of protecting this page from abuse?

I need to show a form in table format with frozen headers and columns.  I thought I could use the jquery multifreezer, but if the fields have default values in them, they are getting duplicated on submitting the form.  So instead of ending up with the form value of 'Day', I get the value 'Day, Day'.

I am guessing this has to do with the cloning that is going on in the javascript.  

Is there a way to not allow the values to duplicate?  I really don't understand.  Below is a link to the MultiFreezer and I have added the contents of the .js file which I believe is the culprit.  


Below is a very simplified version of my form.  As soon as I comment out the line "<script src="multifreezer.js"></script>" it works fine.  I also added screenshots of the results of the form.Without multifreezerWith multifreezer
<!DOCTYPE html> 

<title>Schedule Jobs</title>

function SaveIt()
document.form1.action = "add_jobs-simple.cfm?save=y";

#freezer-example { width: 100%; max-height: 800px; overflow: hidden; margin: 1em auto; font-family:arial;  font-size:14px;}
#freezer-example .table th,#freezer-example .table td { white-space: nowrap; }
#freezer-example .table th { outline: 1px solid #606060; padding: 20px 2px 20px 2px; }
#freezer-example .table td { outline: 1px solid silver; padding: 20px 2px 

Open in new window

I have the page that show a table and in one of the table cell I show a progress bar implemented in bootstrap. When the page is shown in HTML it works fine . When I convert the page into PDF the progress bars disappears
I finally figured out how to create my upper collapse div javascript on the following page which is the PLUS SIGN or MINUS SIGN next to the column of SONGS total number.  However, I can't get the accordion menu to work inside the collapsible div. I've moved the JS file reference from the header to inside the collapsible div and finally to the very bottom of the entire doc assuming there may be some issue of the JS not responding because the divs with the accordion ID have no relevance to the accordion JS.

I've tested the accordion script just fine on a standalone page. I can't figure out why the moving of that concept to this page isn't working.


SAMPLE MENU: http://www.day6management.com/Scripts/acc.cfm
Working with Client-Side CFCharts and passing JSON controls

I'm using the Zoom-In Preview and want to start the graph zoomed-in.

Zoom-In feature of CfChart, with an initial zoom set
The problem is that the setting for initial zoom-in does not seem to be a valid parameter in Coldfusion CFChart.
Looking at the ZingChart documentation (which is what CfChart uses)  I see the value I need in the scale-x attribute,   But CFChart says that is not a valid parameter and of course there is zero documentation on it.   Does anyone know how to include the scale-x attribute?

<cfset variables.xAxis = {"label"={"text"="Drag the handles to zoom in to the chart","color"="red"},"zooming"="true"}>
<cfset variables.yAxis = {"label"={"text"="Drag the handles to zoom in to the chart","color"="red"},"zooming"="true"}>

<cfset variables.zoom = {"alpha"="0.3","zooming"="true","zoomTo"="[10,30]","adjust-layout"="true","border-color"="black","border-width"=4,"background-color"="gray","label"={"border-color"="red","border-width"=2,"font-size"=10}}>

<cfset variables.preview = {"alpha"="0.3","visible"="true","live"="true","preserve-zoom"="true","border-width"="2","vertical-align"="top","adjust-layout"="true"}>

<cfset variables.plotArea = {"margin"="dynamic dynamic 130px dynamic"}>

<cfset variables.scaleX = {"zooming"="true","zoomTo"="[2,5]","adjust-layout"="true"}>   <!==========  I need to set  ZoomTo Value which is part of Scale-X in ZingCharts

  <cfchart alpha=".7"
	   backgroundColor = "##eeeeee"

Open in new window

I have an mssql table which has data stored as csv.

I am trying to output the data into individual rows / checkboxes from the field in the database.

EG SQL Query:
<cfquery datasource="#Application.DSN#" dbtype="odbc" name="getgames">
SELECT games
FROM users
WHERE games LIKE '%arma%'

The query works ands the output is then like:
eso,swtor,wow,rocket league,arma 3

I am using Cold Fusion and trying to output the data as
rocket league
arma 3

Or potentially as
<cfinput type=checkbox name="games" value="#games#">
where value="#games#", being listed as the individual games

I can't seem to get it to work using a cfloop with delimiters="," OR delimiters="#chr(10)##chr(13)#"

I am looking at something along the lines of
<cfloop query="getgames" index="index" list="#games#" delimiters="#chr(10)##chr(13)#">


<cfloop query="getgames" index="index" list="#games#" delimiters=",">

Where am I going wrong with this?
Using Cold Fusion - How to parse this JSON feed that has structure - array - structures.

I've attached a jpg of the cfdump

I just don't work with structures and arrays much anymore
I have used the above sample codeset to use ckeditor4 integration without ckfinder.
But I am able to browse image file from specified path.
On When we upload the image I am recieving and error message"Incorrect server response."

Same "upload.cfm" code  is used for uploading the image . Please help me.
Good day,

I have a ColdFusion program which uses an ajax call to populate a SELECT2. The ajax starts populating the SELECT2 after the 3rd character has been entered. What I am looking for is to display the selected value in SELECT2 after the submit button has been pressed. In other words, assume the word “play” is entered. After the submit button has been pressed, I would like to show “play” in the SELECT2. Below please find the CFM and CFC I am using. Any help is greatly appreciated.

    function prcForm (form) {
       document.forms[0].action = 'comboBoxSelect2Json.cfm';

<cfif  NOT structKeyExists(form, "hdnMortgCashRMaint00")>
	<cfset valMortgCashRMaint00 = "">
	<cfset valMortgCashRMaint00 = hdnMortgCashRMaint00>
	<cfdump var = "#itemName#">

<html lang="en">
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
        <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/css/select2.min.css" rel="stylesheet" />
        <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js"></script>
        <cfform name="vldContactInfo" method="post" action="">
            <div style="width:520px;margin:0px auto;margin-top:30px;height:500px;">
                <h2>Select Box with Search 

Open in new window


How to Address Host Header Attack in
ours is a coldfusion site.
I am trying to figure out how I can list files that are in my dropbox on page created in Coldfusion. On the dropbox site I have created an app and I now have a App key, app secret, etc.
Can someone please point me in the right direction for how I would get my Coldfusion app to connect to my Dropbox account and list files in a selected folder. I am also hoping that users that are logged in to my site can view these files as well but I don't want them to be able to upload, delete, or edit the files on Dropbox.

I have been trying to authorize using cfhttp but with no success

Thank you for any help you can provide.
We have a client that is posting to a cfc using jquery.   These are the form fields that we are getting from them


Open in new window

I feel like I am being stupid but if I want to get the column, id and row for PORTLET_ORDERS[3], how do I do that?   Something as simple as #evaluate("FORM.PORTLET_ORDERS[" & xx & "][ID]")# where xx is a cfloop index doesn't work - it says ID isn't defined which I get.
Good morning all, I have a question related to writing an Excel spreadsheet from ColdFusion (XML). I'm not sure if my problem is my Oracle query, or the way I have the XML put together, but I'm getting some errors when I do certain things. I've attached the code that I'm working with and will try to explain what I'm doing. I'm dealing with two tables, "BUDGET_MIPRS_SENT" and "UNOB_REMARKS". This is a one to many, where I may have several remarks listed in UNOB_REMARKS for a specific entry in BUDGET_MIPRS_SENT. What I want to do is be able to have a spreadsheet that has only the three most recent "remarks" rather than all of the remarks for each record in BUDGET_MIPRS_SENT. So I guess I want to group the remarks together and have a single record on the spreadsheet with the 3 latest remarks grouped together. The way I have the query works when I display on a web page, but when trying to get a spreadsheet I get an error:

Context validation error for tag cfoutput. Either the end tag &lt;/cfoutput&gt; encountered on line 669 at column 3 requires a matching start tag or tag cfoutput does not support end tag. <br>The error occurred on line -1. | Referer: | Template: /mcadev/reports/testreport.cfm |
Good afternoon, I was hoping I could get some help. I am trying to send email with attachments with ColdFusion. It would be multiple attachments based on files in a folder. Those files are uploaded during a submission of a form, and that part works well but I'm getting an error whenever I try to attach those files to an email with the cfmail parameter. Below is just some test code:

  SORT="DateLastModified DESC">

and then my email code is:

<cfmail query="MCALeads"
<cfloop query="myfiles1">
<cfmailparam file="#myfiles1.name#">


Budget Office,

Please prepare


I get an error message through the ColdFusion log:
Message: The resource 2292-GSAFEDSIMMIPRInstructions.doc was not found. The root cause was: ''. <br>The error occurred on line 57. | Referer: | Template: /mcadev/emailtest.cfm

I thought maybe ColdFusion wasn't seeing the files, but I renamed the file, and it sees the renaming in the error message so I am at a loss. Any help would be greatly appreciated!!
We are using an external website to send SMS to our clients from with ColdFusion.

The external website takes the phone number and message and delivers the SMS to the client.  

The URL to the website is http://SMSCOMPANY.CODE.aw/custom/HIDDEN.php?sms_to=PHONE&msg=MESSAGE  " 

When I use the below code, only one SMS is sent.

<cfset aAr1[1][1] = '1234567'>                        <!--- Phone number --->
<cfset aAr1[1][2] = 'Message to 1234567'>      <!--- SMS message to customer --->

<cfset aAr1[2][1] = '7654321'>                        <!--- Phone number --->
<cfset aAr1[2][2] = 'Message to 7654321'>      <!--- SMS message to customer --->

<cfset aAr1[3][1] = '2222222'>                        <!--- Phone number --->
<cfset aAr1[3][2] = 'Message to 2222222'>      <!--- SMS message to customer --->

<cfset aAr1[4][1] = '3333333'>                        <!--- Phone number --->
<cfset aAr1[4][2] = 'Message to 3333333'>      <!--- SMS message to customer --->

<cfloop index="nIdx" from="1" to="#arrayLen(aAr1)#" >

      <cflocation url="http://SMSCOMPANY.CODE.aw/custom/HIDDEN.php?sms_to=#aAr1[nIdx][1]#&msg=#aAr1[nIdx][2]# " >


Someone told me I should use CFTHREAD but I have never worked with CFTHREAD.

Any help is greatly appreciated
calculate the next send date. I have the survey that starts on some date and ends on some date. I need to be able to send the email every 3 days from the survey start until the survey end
Can't seem to figure out how to save this html table as an excel file or csv. My preference is to be able to write it directly to a MySQL table using ColdFusion but can't figure out how to do that either because the html table is just an output of a complex set of queries that include summary calculations, etc. I am ultimately trying to consolidate a MySQL table that has nearly 100,000 rows into a new table that calculates and summarizes the overall rows into a summary table like this page.


I intend to simply import the excel or csv to my MySQL database as a new table using PHPMyAdmin's import tool. I hate that I need this extra step, but I am not a good enough coldfusion programmer to know how to build an array, etc. It's just too complex for my experience. So this is my possible workaround.
Am using a custom tag and am getting an Invalid CFML Construct error on the following:

Invalid CFML construct found on line 27 at column 10.

26 : <cfscript>
27 : cfparam( 'attributes.action', 'new' );
28 : cfparam( 'attributes.fieldList', '' );
29 : cfparam( 'attributes.return', 'variables' );

I am a coldfusion developer.  I have a probably dumb question.  If we want to create some JAVA we apps, would we be able to run those on our coldfusion server?

I know that CF runs on Java, so I am guessing the answer is yes, but am unsure.

Are there java web servers?  Or do people run java on IIS, APache, etc?

Thanks for any info.

How many folks here are security experts in ColdFusion?

Good morning everyone...I have a question/problem which I hope is simple but I'm having a hard time coming up with a solution., I have a simple query, and that query will return several rows of information about a specific project. Each row has a specific id number. I can display the query results using CFLOOP and everything works fine. But what I want to do is a) only show three records (the last three entered) instead of every records and then b) have a button or link where the user can select to show the remaining records. My query is below:

<CFQUERY DATASOURCE="MCA_Oracle" NAME="GetExcludeCurDocCommentList">

and then all I'm doing with the CFLOOP is:


<CFLOOP query="GetExcludeCurDocCommentList">
                     style="border-color:WHITE; border-width:2; background-color:D1D0CE" readonly="Yes"></TD>

<TD><textarea rows="2" cols="73" name="Exs_Remark" style="border-color:WHITE; border-width:2; background-color:D1D0CE" readonly>#GetExcludeCurDocCommentList.REMARKS#</textarea></TD>


ColdFusion Language





ColdFusion is a server-side rapid application development platform originally created by Allaire and now sold by Adobe, implementing the dynamic general purpose CFML programming language. The term ColdFusion is sometimes colloquially used to refer to the CFML language (Cold Fusion Markup Language), but can also include discussions of the server software implementation. ColdFusion runs using a customised version of Apache Tomcat. Earlier versions are bundled with JRun.

Top Experts In
ColdFusion Language