coldfusion

Looping over a Cfquery or a Struct ?

Hi I have a query which retrieves Some data. I want to display that data considering some conditions in different div tags. Now my question is, I am doing this by looping the query once and getting the data in three different structs and using these structs while displaying. Is this a good approach or looping through the query everyt...

ColdFusion - pass regex backreference to function call

Hi, I'm using ColdFusion's reReplace() function for regular expression pattern replacement. I'd like to use a function call for the replacement string, and pass a matched backreference to it. Something like this: <cfset s = "STARTDATE_2010-05-07 00:05:00.0_ENDDATE" /> <cfset s = reReplace(s, "STARTDATE_([\s-.:0-9]*)_ENDDATE", dateAd...

Does the Wrap function in ColdFusion insert CR/LFs?

I have the need to do some word wrapping with a few considerations: 1) Source file is MS WORD 2) Copy and paste the text into a textarea in a cfform. 3) Use #wrap(theTextVar,80)# to dump out the text 80 characters 4) The text is uploaded to a legacy system which needs ansi or ascii chars uploaded. Everything seems to work okay, I ju...

Coldfusion not converting accented text or MS Word chars

Running Coldfusion 8, I am trying to clean text input before saving to a database that will take things like the MS equivalent of ' " - and accented letters, and converting them. I have tried replace, REReplace, and various UDFs found on the internet. None seem to work. In fact, I tried this: <cfscript> function cleanString(string)...

setting up a ColdFusion proxy for XMLHttpRequests

Here's the scenario: I'm setting up a site where I need to do cross-domain XMLHttpRequests, and the external feed is XML. Because of some restrictions on the web server, I need the proxy to be written in ColdFusion. The URI that needs to be proxied is dynamic, but a set URI is good for now. I've never written a single line in ColdFusi...

(SQL) Selecting from a database based on multiple pairs of pairs

The problem i've encountered is attempting to select rows from a database where 2 columns in that row align to specific pairs of data. IE selecting rows from data where id = 1 AND type = 'news'. Obviously, if it was 1 simple pair it would be easy, but the issue is we are selecting rows based on 100s of pair of data. I feel as if there mu...

Tools for website/web application load testing?

Before going into production, our client demands actual numbers of how many users our web application can handle. We have all kinds of features implemented including asset management (file uploads/downloads), documents import/export, various statistics, web-services etc. I guess we need tool which could emulate users form submission be...

Why is ColdFusion adding whitespace when I call a function in cfoutput?

If I do something like this in ColdFusion: <cfoutput>foo="#foo()#"</cfoutput> The resulting HTML has a space in front of it: foo=" BAR" However, if it is not a function call it works fine, i.e.: <cfset fooOut=foo() /> <cfoutput>foo="#fooOut#"</cfoutput> Gives this output: foo="BAR" Where is this extra space coming from and is...

MySQL, Coldfusion, Selecting records that were timestamped in the last 24 hours.

With Coldfuson & MySQL - How to update the query to check for new entries that have a timestamp that occurs in the last 24 hours? Query: <cfquery name="caller.sel_BlogEntries" datasource="#request.db#"> SELECT blogentry.dateAdded, person.personName FROM blogentry INNER JOIN person ON blogentry.personID = person.personID WHE...

How to make ListFind() to consider a string having a comma in it as a complete single string.

Hi, I got a problem in using listfind(). I have a list of strings.One of my string has a comma. Now when i use listfind() to compare with another string I dont get the output expected. i.e The string with a comma in it is not detected. Please can anyone tell me how to make the listfind to work even for the string having comma in it ? ...

How can I setup ANT with Subversion and ColdFusion Builder (eclipse) to check out a local build to work on?

I am not sure if there's an answer for this already -- couldn't find one for this (hopefully common) setup: I recently converted one of my ColdFusion projects to deploy via ANT. I have a local ant script that instructs a remote server to check out the code, and run the application's specific build file, remotely on the server. I hav...

Auto submitting to cfm

I've created a form that posts to a cfm file. When running a script onLoad that fills in the form values and tries to submit...The site takes me back to the login screen. <script> function f() { document.getElementById("email").value = "[email protected]"; document.getElementById("password").value = "asdf"; document.getElementById("form1")....

item-not-found(404) when trying to get a node using Smackx pubsub

I'm trying to use the latest Smackx trunk to get and then subscribe to a pubsub node. However, openfire just sends me a back an error: item not found (404). I am instantiating the java objects from ColdFusion, so my code snippets might look funny but maybe someone will be able to tell me what I've forgotten. Here's how I create the nod...

Stack overflow while working with CFBuilder plugin

In the past 30 minutes of working in CFBuilder (I have it as an Eclipse Plug in), I got this error 4 times: A stack overflow has occurred. You are recommended to exit the workbench. Subsequent errors may happen and may terminate the workbench without warning. See the .log file for more details. Do you want to exit workbench?. toge...

Coldfusion: download PDF

I have a URL that opens a PDF: <cfoutput>http://myUrl.cfm?params=#many#&lt;cfoutput&gt; I would like to enable my users to download that PDF instead of having it open in the browser. I've been trying the following, and it isn't working: <cfoutput> <cfcontent type="application/pdf" file="http://myUrl.cfm?params=#many#"/&gt; <cfhe...

CFGRID - replace data store or filter on more than one column

ColdFusion 8 I have a cfgrid that that is based on a query. It is not bound to a cfc function because I want a scrolling grid, not a paged grid (you must supply the page number and page size if you use BIND).. I can figure out how to make it filter on one column by using the following code, but I really need to filter on three columns.....

TripleDES in Perl/PHP/ColdFusion

Recently a problem arose regarding hooking up an API with a payment processor who were requesting a string to be encrypted to be used as a token, using the TripleDES standard. Our Applications run using ColdFusion, which has an Encrypt tag - that supports TripleDES - however the result we were getting back was not what the payment proces...

For HTML Emails, How to embed images so users don't get a download prompt

I'm working to create an HTML email which includes 2 images. Currently, I'm using tags to place the image in the email. Problem is when users get the email, it's asking the user to "click to download" for security reasons. Is there a way to embed the image in the email, to avoid this issue? I'm using Coldfusion to send the email. Tha...

Breadcrumbs in Fusebox 4/5

I'm wondering if anyone has come up with a clean way to generate a breadcrumbs trail in Fusebox. Specifically, is there a way of keeping track of "where you are" and having that somehow generate the breadcrumbs for you? So, for example, if you're executing /index.cfm?fuseaction=Widgets.ViewWidget&widget=1 and the circuit structure i...

Things to keep in mind during Application Migration: ColdFusion to Spring

This question is regarding migration project. Currently the legacy Application is in ColdFusion and we want to migrate it to Spring Framework. So my main questions are: What are the things to keep in mind while considering Migration Project ? Are there any specifics things that I need to keep in mind while considering migration from ...