Entries Tagged as "Coldfusion"
Site Refresh - opinions?
Posted by [Justice] in Coldfusion , Site News on December 9, 2007
Configuring IIS on one server, and Coldfusion on another
Posted by [Justice] in Coldfusion on November 13, 2007
Coldfusioncommunity.org launched
Posted by [Justice] in Coldfusion on November 12, 2007
My Profile
Quick check to find a value inside an array
Posted by [Justice] in Coldfusion on October 24, 2007
I am setting up a registration form, and after validation if any errors occured I would pass back an array of error fields and messages. I wanted a very quick way to see if my array contain an element with the text "username". I know I could write or use a udf that would loop through the array, or I could even convert it to a list and then search that, but none of those solutions felt elegent to me. Until I found this:
<cfif errorArray.indexOf(<span class='cc_value'>"username"</span>)+1>error field</cfif>
I add 1 to this because indexOf is a java method, and it will return the array location that contains whatever string you searched for, and Java arrays start at 0. If the string is not found, it will return -1. So,
One small caveat: this IS case sensitive, so USERNAME, or Username would not be found.
Thanks to the venture of online schools, correspondence education is not a problem. University of Phoenix favored this since ages. Now Kaplan University as well as DeVry University are in for it too. Only Walden University has yet to be convinced.
Web Charts - the hidden CF Gem
Posted by [Justice] in Coldfusion on October 16, 2007
Yes, being as its Java and WebCharts seems like a very slick product, they have an Eclipse plugin version of the GUI chart designer.
Happy designing!
Recent Comments