News by David Garthe

This feed does not validate. (details)

ListFindNoCase problem with spaces

3 Sep 05:07
I ran into a problem today trying to find a person's userId value from a list of values using "listFindNoCase". Here's the code: This person is allowed in. This person is not allowed in. Its difficult to see on this page, but there is a space after each comma in "allwedValues". This causes coldFusion to compare "33333a" to " 33333a", resulting in a false response. Removing the space between each value solved this, although it seems to be a bug to me.

What happened to the variables I set?

28 Feb 04:17
Here's a question for everyone out there. I created a query: SELECT * FROM companyList WHERE companyId = #url.companyId# Then without really thinking tried to set some new variables so my page wouldn't error out: I did a CFDUMP of companyInfo, and it dumps the query result without the additional variables. What exactly happened to the new variables? If I try to declare the structure with a StructNew() it overwrites the query.

cftextarea bug

4 Feb 07:33
Came across an interesting bug today with CFTEXTAREA. Not a bug with ColdFusion, but a bug with the Homesite update files from Adobe. Below is how Homesite filled in the tag using their WYSIWYG: As you can see, it has enabled="Yes", and disabled="No". Kind of strange to have them both as options, and I've never really recognized it before this problem came up. I had simply updated my Homesite files with the tag and help files from Adobe.

setting a dynamic variable name

28 Jan 03:08
This is probably known to many, but you can set a variable with a dynamic name. I've only come across one or two instances in ten years where this is necessary. Those times have always been to quickly fix existing code and remove hard-coding of variable names. There's always 10 ways to get to the same destination with programming, and I usually don't take this one. However, it is an option, so I'm demonstrating it here.

CFWINDOW and CFFORM don't like hidden form variables named "action"

3 Jan 06:40
I kept getting an error with a CFFORM that I was using within a CFWINDOW. The error was: error: http: Error retrieving markup for element editWindow_body : Not Found This error message would go away if I would use a regular HTML form tag. After a bit of searching I found the solution. I had a hidden variable in the form named "action".
Pages   ← previous   next
1 2